mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Docs: Use 3-digit, x.x.x-style semantic versioning for _doing_it_wrong(), _deprecated_function(), _deprecated_argument(), and _deprecated_file() throughout core.
Props metodiew. Fixes #36495. git-svn-id: https://develop.svn.wordpress.org/trunk@37985 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -151,7 +151,7 @@ function is_archive() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ function is_post_type_archive( $post_types = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ function is_attachment( $attachment = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ function is_author( $author = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ function is_category( $category = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ function is_tag( $tag = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -294,7 +294,7 @@ function is_tax( $taxonomy = '', $term = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ function is_date() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ function is_day() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ function is_feed( $feeds = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,7 @@ function is_comment_feed() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ function is_front_page() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ function is_home() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ function is_month() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -480,7 +480,7 @@ function is_page( $page = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -500,7 +500,7 @@ function is_paged() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ function is_preview() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ function is_robots() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ function is_search() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -589,7 +589,7 @@ function is_single( $post = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -616,7 +616,7 @@ function is_singular( $post_types = '' ) {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ function is_time() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -656,7 +656,7 @@ function is_trackback() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -676,7 +676,7 @@ function is_year() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -696,7 +696,7 @@ function is_404() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -716,7 +716,7 @@ function is_embed() {
|
||||
global $wp_query;
|
||||
|
||||
if ( ! isset( $wp_query ) ) {
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
|
||||
_doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ function is_main_query() {
|
||||
'<code>is_main_query()</code>',
|
||||
__( 'https://codex.wordpress.org/Function_Reference/is_main_query' )
|
||||
);
|
||||
_doing_it_wrong( __FUNCTION__, $message, '3.7' );
|
||||
_doing_it_wrong( __FUNCTION__, $message, '3.7.0' );
|
||||
}
|
||||
|
||||
global $wp_query;
|
||||
@@ -2533,7 +2533,7 @@ class WP_Query {
|
||||
$page = 1;
|
||||
|
||||
if ( isset( $q['caller_get_posts'] ) ) {
|
||||
_deprecated_argument( 'WP_Query', '3.1', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
|
||||
_deprecated_argument( 'WP_Query', '3.1.0', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
|
||||
if ( !isset( $q['ignore_sticky_posts'] ) )
|
||||
$q['ignore_sticky_posts'] = $q['caller_get_posts'];
|
||||
}
|
||||
@@ -4424,7 +4424,7 @@ class WP_Query {
|
||||
* @return bool
|
||||
*/
|
||||
public function is_comments_popup() {
|
||||
_deprecated_function( __FUNCTION__, '4.5' );
|
||||
_deprecated_function( __FUNCTION__, '4.5.0' );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user