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.
Built from https://develop.svn.wordpress.org/trunk@37985


git-svn-id: http://core.svn.wordpress.org/trunk@37926 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-07-06 12:40:29 +00:00
parent 3c8c6fee4d
commit 139387b7e5
64 changed files with 385 additions and 385 deletions

View File

@ -9,7 +9,7 @@
* @subpackage Administration
*/
_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/admin.php' );
_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/admin.php' );
/** WordPress Administration API: Includes all Administration functions. */
require_once(ABSPATH . 'wp-admin/includes/admin.php');

View File

@ -139,7 +139,7 @@ class WP_Filesystem_Base {
* @return string The location of the remote path.
*/
public function find_base_dir( $base = '.', $echo = false ) {
_deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
_deprecated_function(__FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
$this->verbose = $echo;
return $this->abspath();
}
@ -161,7 +161,7 @@ class WP_Filesystem_Base {
* @return string The location of the remote path.
*/
public function get_base_dir( $base = '.', $echo = false ) {
_deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
_deprecated_function(__FUNCTION__, '2.7.0', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' );
$this->verbose = $echo;
return $this->abspath();
}

View File

@ -18,7 +18,7 @@
* @see wp_editor()
*/
function tinymce_include() {
_deprecated_function( __FUNCTION__, '2.1', 'wp_editor()' );
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_editor()' );
wp_tiny_mce();
}
@ -31,7 +31,7 @@ function tinymce_include() {
*
*/
function documentation_link() {
_deprecated_function( __FUNCTION__, '2.5' );
_deprecated_function( __FUNCTION__, '2.5.0' );
}
/**
@ -48,7 +48,7 @@ function documentation_link() {
* @return array Shrunk dimensions (width, height).
*/
function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
}
@ -64,7 +64,7 @@ function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
* @return array Shrunk dimensions (width, height).
*/
function get_udims( $width, $height ) {
_deprecated_function( __FUNCTION__, '3.5', 'wp_constrain_dimensions()' );
_deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
return wp_constrain_dimensions( $width, $height, 128, 96 );
}
@ -80,7 +80,7 @@ function get_udims( $width, $height ) {
* @param array $popular_ids Unused.
*/
function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
_deprecated_function( __FUNCTION__, '2.6', 'wp_category_checklist()' );
_deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
global $post_ID;
wp_category_checklist( $post_ID );
}
@ -95,7 +95,7 @@ function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array()
* @param int $default Unused.
*/
function dropdown_link_categories( $default = 0 ) {
_deprecated_function( __FUNCTION__, '2.6', 'wp_link_category_checklist()' );
_deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' );
global $link_id;
wp_link_category_checklist( $link_id );
}
@ -111,7 +111,7 @@ function dropdown_link_categories( $default = 0 ) {
* @return string Full filesystem path to edit.
*/
function get_real_file_to_edit( $file ) {
_deprecated_function( __FUNCTION__, '2.9' );
_deprecated_function( __FUNCTION__, '2.9.0' );
return WP_CONTENT_DIR . $file;
}
@ -131,7 +131,7 @@ function get_real_file_to_edit( $file ) {
* @return bool|null False if no categories were found.
*/
function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
if (!$categories )
$categories = get_categories( array('hide_empty' => 0) );
@ -165,7 +165,7 @@ function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $le
* @param callable $sanitize_callback A callback function that sanitizes the option's value.
*/
function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
register_setting( $option_group, $option_name, $sanitize_callback );
}
@ -181,7 +181,7 @@ function add_option_update_handler( $option_group, $option_name, $sanitize_callb
* @param callable $sanitize_callback
*/
function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
_deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
unregister_setting( $option_group, $option_name, $sanitize_callback );
}
@ -194,7 +194,7 @@ function remove_option_update_handler( $option_group, $option_name, $sanitize_ca
* @param string $filename
**/
function codepress_get_lang( $filename ) {
_deprecated_function( __FUNCTION__, '3.0' );
_deprecated_function( __FUNCTION__, '3.0.0' );
}
/**
@ -204,7 +204,7 @@ function codepress_get_lang( $filename ) {
* @deprecated 3.0.0
**/
function codepress_footer_js() {
_deprecated_function( __FUNCTION__, '3.0' );
_deprecated_function( __FUNCTION__, '3.0.0' );
}
/**
@ -214,7 +214,7 @@ function codepress_footer_js() {
* @deprecated 3.0.0
**/
function use_codepress() {
_deprecated_function( __FUNCTION__, '3.0' );
_deprecated_function( __FUNCTION__, '3.0.0' );
}
/**
@ -225,7 +225,7 @@ function use_codepress() {
* @return array List of user IDs.
*/
function get_author_user_ids() {
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
global $wpdb;
if ( !is_multisite() )
@ -245,7 +245,7 @@ function get_author_user_ids() {
* @return array|bool List of editable authors. False if no editable users.
*/
function get_editable_authors( $user_id ) {
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
global $wpdb;
@ -271,7 +271,7 @@ function get_editable_authors( $user_id ) {
* @return array Array of editable user IDs, empty array otherwise.
*/
function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
global $wpdb;
@ -304,7 +304,7 @@ function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'p
* @deprecated 3.1.0 Use get_users()
*/
function get_nonauthor_user_ids() {
_deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
_deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
global $wpdb;
@ -480,7 +480,7 @@ class WP_User_Search {
* @return WP_User_Search
*/
function __construct( $search_term = '', $page = '', $role = '' ) {
_deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' );
_deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
$this->search_term = wp_unslash( $search_term );
$this->raw_page = ( '' == $page ) ? false : (int) $page;
@ -670,7 +670,7 @@ endif;
* @return array List of posts from others.
*/
function get_others_unpublished_posts( $user_id, $type = 'any' ) {
_deprecated_function( __FUNCTION__, '3.1' );
_deprecated_function( __FUNCTION__, '3.1.0' );
global $wpdb;
@ -703,7 +703,7 @@ function get_others_unpublished_posts( $user_id, $type = 'any' ) {
* @return array List of drafts from other users.
*/
function get_others_drafts($user_id) {
_deprecated_function( __FUNCTION__, '3.1' );
_deprecated_function( __FUNCTION__, '3.1.0' );
return get_others_unpublished_posts($user_id, 'draft');
}
@ -718,7 +718,7 @@ function get_others_drafts($user_id) {
* @return array List of posts with pending review post type from other users.
*/
function get_others_pending($user_id) {
_deprecated_function( __FUNCTION__, '3.1' );
_deprecated_function( __FUNCTION__, '3.1.0' );
return get_others_unpublished_posts($user_id, 'pending');
}
@ -731,7 +731,7 @@ function get_others_pending($user_id) {
* @see wp_dashboard_quick_press()
*/
function wp_dashboard_quick_press_output() {
_deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' );
_deprecated_function( __FUNCTION__, '3.2.0', 'wp_dashboard_quick_press()' );
wp_dashboard_quick_press();
}
@ -745,7 +745,7 @@ function wp_dashboard_quick_press_output() {
* @staticvar int $num
*/
function wp_tiny_mce( $teeny = false, $settings = false ) {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
static $num = 1;
@ -771,7 +771,7 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
* @see wp_editor()
*/
function wp_preload_dialogs() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
}
/**
@ -781,7 +781,7 @@ function wp_preload_dialogs() {
* @see wp_editor()
*/
function wp_print_editor_js() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
}
/**
@ -791,7 +791,7 @@ function wp_print_editor_js() {
* @see wp_editor()
*/
function wp_quicktags() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
}
/**
@ -802,7 +802,7 @@ function wp_quicktags() {
* @see WP_Screen::render_screen_layout()
*/
function screen_layout( $screen ) {
_deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_screen_layout()' );
_deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_screen_layout()' );
$current_screen = get_current_screen();
@ -822,7 +822,7 @@ function screen_layout( $screen ) {
* @see WP_Screen::render_per_page_options()
*/
function screen_options( $screen ) {
_deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_per_page_options()' );
_deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );
$current_screen = get_current_screen();
@ -854,7 +854,7 @@ function screen_meta( $screen ) {
* @see WP_Admin_Bar
*/
function favorite_actions() {
_deprecated_function( __FUNCTION__, '3.2', 'WP_Admin_Bar' );
_deprecated_function( __FUNCTION__, '3.2.0', 'WP_Admin_Bar' );
}
/**
@ -866,7 +866,7 @@ function favorite_actions() {
* @return null|string
*/
function media_upload_image() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
return wp_media_upload_handler();
}
@ -879,7 +879,7 @@ function media_upload_image() {
* @return null|string
*/
function media_upload_audio() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
return wp_media_upload_handler();
}
@ -892,7 +892,7 @@ function media_upload_audio() {
* @return null|string
*/
function media_upload_video() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
return wp_media_upload_handler();
}
@ -905,7 +905,7 @@ function media_upload_video() {
* @return null|string
*/
function media_upload_file() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
return wp_media_upload_handler();
}
@ -918,7 +918,7 @@ function media_upload_file() {
* @return string
*/
function type_url_form_image() {
_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" );
_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('image')" );
return wp_media_insert_url_form( 'image' );
}
@ -931,7 +931,7 @@ function type_url_form_image() {
* @return string
*/
function type_url_form_audio() {
_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" );
_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('audio')" );
return wp_media_insert_url_form( 'audio' );
}
@ -944,7 +944,7 @@ function type_url_form_audio() {
* @return string
*/
function type_url_form_video() {
_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" );
_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('video')" );
return wp_media_insert_url_form( 'video' );
}
@ -957,7 +957,7 @@ function type_url_form_video() {
* @return string
*/
function type_url_form_file() {
_deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
_deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
return wp_media_insert_url_form( 'file' );
}
@ -974,7 +974,7 @@ function type_url_form_file() {
* @param string $help The content of an 'Overview' help tab.
*/
function add_contextual_help( $screen, $help ) {
_deprecated_function( __FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
if ( is_string( $screen ) )
$screen = convert_to_screen( $screen );
@ -992,7 +992,7 @@ function add_contextual_help( $screen, $help ) {
* @return array $themes Array of allowed themes.
*/
function get_allowed_themes() {
_deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'allowed' => true ) )" );
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
$themes = wp_get_themes( array( 'allowed' => true ) );
@ -1014,7 +1014,7 @@ function get_allowed_themes() {
* @return array
*/
function get_broken_themes() {
_deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'errors' => true )" );
_deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
$themes = wp_get_themes( array( 'errors' => true ) );
$broken = array();
@ -1039,7 +1039,7 @@ function get_broken_themes() {
* @return WP_Theme
*/
function current_theme_info() {
_deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
_deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
return wp_get_theme();
}
@ -1052,7 +1052,7 @@ function current_theme_info() {
* @deprecated 3.5.0
*/
function _insert_into_post_button( $type ) {
_deprecated_function( __FUNCTION__, '3.5' );
_deprecated_function( __FUNCTION__, '3.5.0' );
}
/**
@ -1063,7 +1063,7 @@ function _insert_into_post_button( $type ) {
* @deprecated 3.5.0
*/
function _media_button($title, $icon, $type, $id) {
_deprecated_function( __FUNCTION__, '3.5' );
_deprecated_function( __FUNCTION__, '3.5.0' );
}
/**
@ -1077,7 +1077,7 @@ function _media_button($title, $icon, $type, $id) {
* @return object
*/
function get_post_to_edit( $id ) {
_deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
_deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
return get_post( $id, OBJECT, 'edit' );
}
@ -1092,7 +1092,7 @@ function get_post_to_edit( $id ) {
* @return WP_Post Post object containing all the default post data as attributes
*/
function get_default_page_to_edit() {
_deprecated_function( __FUNCTION__, '3.5', "get_default_post_to_edit( 'page' )" );
_deprecated_function( __FUNCTION__, '3.5.0', "get_default_post_to_edit( 'page' )" );
$page = get_default_post_to_edit();
$page->post_type = 'page';
@ -1112,7 +1112,7 @@ function get_default_page_to_edit() {
* @return string Thumbnail path on success, Error string on failure.
*/
function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
_deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
_deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
}
@ -1125,7 +1125,7 @@ function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
* @deprecated 3.6.0
*/
function wp_nav_menu_locations_meta_box() {
_deprecated_function( __FUNCTION__, '3.6' );
_deprecated_function( __FUNCTION__, '3.6.0' );
}
/**
@ -1139,7 +1139,7 @@ function wp_nav_menu_locations_meta_box() {
* @see Core_Upgrader
*/
function wp_update_core($current, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' );
_deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);
@ -1162,7 +1162,7 @@ function wp_update_core($current, $feedback = '') {
* @see Plugin_Upgrader
*/
function wp_update_plugin($plugin, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' );
_deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);
@ -1184,7 +1184,7 @@ function wp_update_plugin($plugin, $feedback = '') {
* @see Theme_Upgrader
*/
function wp_update_theme($theme, $feedback = '') {
_deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' );
_deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
if ( !empty($feedback) )
add_filter('update_feedback', $feedback);
@ -1203,7 +1203,7 @@ function wp_update_theme($theme, $feedback = '') {
* @param int|bool $id
*/
function the_attachment_links( $id = false ) {
_deprecated_function( __FUNCTION__, '3.7' );
_deprecated_function( __FUNCTION__, '3.7.0' );
}
/**
@ -1305,7 +1305,7 @@ function wp_dashboard_secondary_control() {}
* @param int $new_ID
*/
function _relocate_children( $old_ID, $new_ID ) {
_deprecated_function( __FUNCTION__, '3.9' );
_deprecated_function( __FUNCTION__, '3.9.0' );
}
/**
@ -1332,7 +1332,7 @@ function _relocate_children( $old_ID, $new_ID ) {
* @return string The resulting page's hook_suffix.
*/
function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
_deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' );
_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
global $_wp_last_object_menu;
@ -1365,7 +1365,7 @@ function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $fu
* @return string The resulting page's hook_suffix.
*/
function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
_deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' );
_deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
global $_wp_last_utility_menu;
@ -1390,7 +1390,7 @@ function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $f
function post_form_autocomplete_off() {
global $is_safari, $is_chrome;
_deprecated_function( __FUNCTION__, '4.6' );
_deprecated_function( __FUNCTION__, '4.6.0' );
if ( $is_safari || $is_chrome ) {
echo ' autocomplete="off"';

View File

@ -256,7 +256,7 @@ function wp_stream_image( $image, $mime_type, $post_id ) {
return true;
} else {
_deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
/**
* Filters the GD image resource to be streamed to the browser.
@ -321,7 +321,7 @@ function wp_save_image_file( $filename, $image, $mime_type, $post_id ) {
return $image->save( $filename, $mime_type );
} else {
_deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
/** This filter is documented in wp-admin/includes/image-edit.php */
$image = apply_filters( 'image_save_pre', $image, $post_id );
@ -387,7 +387,7 @@ function _image_get_preview_ratio($w, $h) {
* @return resource|false GD image resource, false otherwise.
*/
function _rotate_image_resource($img, $angle) {
_deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::rotate' ) );
_deprecated_function( __FUNCTION__, '3.5.0', __( 'Use WP_Image_Editor::rotate' ) );
if ( function_exists('imagerotate') ) {
$rotated = imagerotate($img, $angle, 0);
if ( is_resource($rotated) ) {
@ -410,7 +410,7 @@ function _rotate_image_resource($img, $angle) {
* @return resource (maybe) flipped image resource.
*/
function _flip_image_resource($img, $horz, $vert) {
_deprecated_function( __FUNCTION__, '3.5', __( 'Use WP_Image_Editor::flip' ) );
_deprecated_function( __FUNCTION__, '3.5.0', __( 'Use WP_Image_Editor::flip' ) );
$w = imagesx($img);
$h = imagesy($img);
$dst = wp_imagecreatetruecolor($w, $h);
@ -463,7 +463,7 @@ function _crop_image_resource($img, $x, $y, $w, $h) {
*/
function image_edit_apply_changes( $image, $changes ) {
if ( is_resource( $image ) )
_deprecated_argument( __FUNCTION__, '3.5', __( '$image needs to be an WP_Image_Editor object' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', __( '$image needs to be an WP_Image_Editor object' ) );
if ( !is_array($changes) )
return $image;

View File

@ -1013,7 +1013,7 @@ function xfn_check( $class, $value = '', $deprecated = '' ) {
global $link;
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '0.0' ); // Never implemented
_deprecated_argument( __FUNCTION__, '0.0.0' ); // Never implemented
$link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
$rels = preg_split('/\s+/', $link_rel);

View File

@ -16,7 +16,7 @@
* @deprecated 3.0.0
*/
function wpmu_menu() {
_deprecated_function(__FUNCTION__, '3.0' );
_deprecated_function(__FUNCTION__, '3.0.0' );
// Deprecated. See #11763.
}
@ -27,7 +27,7 @@ function wpmu_menu() {
* @see is_upload_space_available()
*/
function wpmu_checkAvailableSpace() {
_deprecated_function(__FUNCTION__, '3.0', 'is_upload_space_available()' );
_deprecated_function(__FUNCTION__, '3.0.0', 'is_upload_space_available()' );
if ( !is_upload_space_available() )
wp_die( __('Sorry, you must delete files before you can upload any more.') );
@ -39,7 +39,7 @@ function wpmu_checkAvailableSpace() {
* @deprecated 3.0.0
*/
function mu_options( $options ) {
_deprecated_function(__FUNCTION__, '3.0' );
_deprecated_function(__FUNCTION__, '3.0.0' );
return $options;
}
@ -50,7 +50,7 @@ function mu_options( $options ) {
* @see activate_plugin()
*/
function activate_sitewide_plugin() {
_deprecated_function(__FUNCTION__, '3.0', 'activate_plugin()' );
_deprecated_function(__FUNCTION__, '3.0.0', 'activate_plugin()' );
return false;
}
@ -61,7 +61,7 @@ function activate_sitewide_plugin() {
* @see deactivate_sitewide_plugin()
*/
function deactivate_sitewide_plugin( $plugin = false ) {
_deprecated_function(__FUNCTION__, '3.0', 'deactivate_plugin()' );
_deprecated_function(__FUNCTION__, '3.0.0', 'deactivate_plugin()' );
}
/**
@ -71,7 +71,7 @@ function deactivate_sitewide_plugin( $plugin = false ) {
* @see is_network_only_plugin()
*/
function is_wpmu_sitewide_plugin( $file ) {
_deprecated_function(__FUNCTION__, '3.0', 'is_network_only_plugin()' );
_deprecated_function(__FUNCTION__, '3.0.0', 'is_network_only_plugin()' );
return is_network_only_plugin( $file );
}
@ -82,7 +82,7 @@ function is_wpmu_sitewide_plugin( $file ) {
* @see WP_Theme::get_allowed_on_network()
*/
function get_site_allowed_themes() {
_deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_network()' );
_deprecated_function( __FUNCTION__, '3.4.0', 'WP_Theme::get_allowed_on_network()' );
return array_map( 'intval', WP_Theme::get_allowed_on_network() );
}
@ -93,7 +93,7 @@ function get_site_allowed_themes() {
* @see WP_Theme::get_allowed_on_site()
*/
function wpmu_get_blog_allowedthemes( $blog_id = 0 ) {
_deprecated_function( __FUNCTION__, '3.4', 'WP_Theme::get_allowed_on_site()' );
_deprecated_function( __FUNCTION__, '3.4.0', 'WP_Theme::get_allowed_on_site()' );
return array_map( 'intval', WP_Theme::get_allowed_on_site( $blog_id ) );
}

View File

@ -528,7 +528,7 @@ function update_user_status( $id, $pref, $value, $deprecated = null ) {
global $wpdb;
if ( null !== $deprecated )
_deprecated_argument( __FUNCTION__, '3.1' );
_deprecated_argument( __FUNCTION__, '3.0.2' );
$wpdb->update( $wpdb->users, array( sanitize_key( $pref ) => $value ), array( 'ID' => $id ) );

View File

@ -86,7 +86,7 @@ function get_plugin_data( $plugin_file, $markup = true, $translate = true ) {
// Site Wide Only is the old header for Network
if ( ! $plugin_data['Network'] && $plugin_data['_sitewide'] ) {
/* translators: 1: Site Wide Only: true, 2: Network: true */
_deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The %1$s plugin header is deprecated. Use %2$s instead.' ), '<code>Site Wide Only: true</code>', '<code>Network: true</code>' ) );
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The %1$s plugin header is deprecated. Use %2$s instead.' ), '<code>Site Wide Only: true</code>', '<code>Network: true</code>' ) );
$plugin_data['Network'] = $plugin_data['_sitewide'];
}
$plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) );
@ -1777,12 +1777,12 @@ function register_setting( $option_group, $option_name, $sanitize_callback = ''
global $new_whitelist_options;
if ( 'misc' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
$option_group = 'general';
}
if ( 'privacy' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
$option_group = 'reading';
}
@ -1806,12 +1806,12 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
global $new_whitelist_options;
if ( 'misc' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
$option_group = 'general';
}
if ( 'privacy' == $option_group ) {
_deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
$option_group = 'reading';
}

View File

@ -1204,12 +1204,12 @@ function add_settings_section($id, $title, $callback, $page) {
global $wp_settings_sections;
if ( 'misc' == $page ) {
_deprecated_argument( __FUNCTION__, '3.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
_deprecated_argument( __FUNCTION__, '3.0.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'misc' ) );
$page = 'general';
}
if ( 'privacy' == $page ) {
_deprecated_argument( __FUNCTION__, '3.5', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', sprintf( __( 'The "%s" options group has been removed. Use another settings group.' ), 'privacy' ) );
$page = 'reading';
}
@ -1255,12 +1255,12 @@ function add_settings_field($id, $title, $callback, $page, $section = 'default',
global $wp_settings_fields;
if ( 'misc' == $page ) {
_deprecated_argument( __FUNCTION__, '3.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
_deprecated_argument( __FUNCTION__, '3.0.0', __( 'The miscellaneous options group has been removed. Use another settings group.' ) );
$page = 'general';
}
if ( 'privacy' == $page ) {
_deprecated_argument( __FUNCTION__, '3.5', __( 'The privacy options group has been removed. Use another settings group.' ) );
_deprecated_argument( __FUNCTION__, '3.5.0', __( 'The privacy options group has been removed. Use another settings group.' ) );
$page = 'reading';
}
@ -1996,7 +1996,7 @@ function _wp_admin_html_begin() {
*/
function convert_to_screen( $hook_name ) {
if ( ! class_exists( 'WP_Screen', false ) ) {
_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3' );
_doing_it_wrong( 'convert_to_screen(), add_meta_box()', __( "Likely direct inclusion of wp-admin/includes/template.php in order to use add_meta_box(). This is very wrong. Hook the add_meta_box() call into the add_meta_boxes action instead." ), '3.3.0' );
return (object) array( 'id' => '_invalid', 'base' => '_are_belong_to_us' );
}

View File

@ -29,7 +29,7 @@ $theme_field_defaults = array( 'description' => true, 'sections' => false, 'test
* @return array
*/
function install_themes_feature_list() {
_deprecated_function( __FUNCTION__, '3.1', 'get_theme_feature_list()' );
_deprecated_function( __FUNCTION__, '3.1.0', 'get_theme_feature_list()' );
if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
@ -160,7 +160,7 @@ function install_themes_upload() {
* @param object $theme
*/
function display_theme( $theme ) {
_deprecated_function( __FUNCTION__, '3.4' );
_deprecated_function( __FUNCTION__, '3.4.0' );
global $wp_list_table;
if ( ! isset( $wp_list_table ) ) {
$wp_list_table = _get_list_table('WP_Theme_Install_List_Table');

View File

@ -38,7 +38,7 @@ if ( !function_exists('wp_install') ) :
*/
function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '', $language = '' ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.6' );
_deprecated_argument( __FUNCTION__, '2.6.0' );
wp_check_mysql_version();
wp_cache_flush();

View File

@ -353,7 +353,7 @@ if ( ! empty( $languages ) || ! empty( $translations ) ) {
</p>
<?php
}
_deprecated_argument( 'define()', '4.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
_deprecated_argument( 'define()', '4.0.0', sprintf( __( 'The %s constant in your %s file is no longer needed.' ), 'WPLANG', 'wp-config.php' ) );
}
?>
</td>

View File

@ -195,7 +195,7 @@ if ( 'update' == $action ) {
if ( $options ) {
foreach ( $options as $option ) {
if ( $unregistered ) {
_deprecated_argument( 'options.php', '2.7',
_deprecated_argument( 'options.php', '2.7.0',
sprintf(
/* translators: %s: the option/setting */
__( 'The %s setting is unregistered. Unregistered settings are deprecated. See https://codex.wordpress.org/Settings_API' ),

View File

@ -8,5 +8,5 @@
* @subpackage Administration
*/
_deprecated_file( basename(__FILE__), '2.5', 'wp-admin/includes/upgrade.php' );
_deprecated_file( basename(__FILE__), '2.5.0', 'wp-admin/includes/upgrade.php' );
require_once(ABSPATH . 'wp-admin/includes/upgrade.php');

View File

@ -24,7 +24,7 @@ function get_the_author($deprecated = '') {
global $authordata;
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.1' );
_deprecated_argument( __FUNCTION__, '2.1.0' );
/**
* Filters the display name of the current post's author.
@ -57,11 +57,11 @@ function get_the_author($deprecated = '') {
*/
function the_author( $deprecated = '', $deprecated_echo = true ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.1' );
_deprecated_argument( __FUNCTION__, '2.1.0' );
}
if ( true !== $deprecated_echo ) {
_deprecated_argument( __FUNCTION__, '1.5',
_deprecated_argument( __FUNCTION__, '1.5.0',
/* translators: %s: get_the_author() */
sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
'<code>get_the_author()</code>'
@ -277,7 +277,7 @@ function get_the_author_posts_link() {
*/
function the_author_posts_link( $deprecated = '' ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.1' );
_deprecated_argument( __FUNCTION__, '2.1.0' );
}
echo get_the_author_posts_link();
}

View File

@ -264,7 +264,7 @@ function wp_cache_add_non_persistent_groups( $groups ) {
* @global WP_Object_Cache $wp_object_cache Object cache global instance.
*/
function wp_cache_reset() {
_deprecated_function( __FUNCTION__, '3.5' );
_deprecated_function( __FUNCTION__, '3.5.0' );
global $wp_object_cache;
@ -631,7 +631,7 @@ class WP_Object_Cache {
* @see switch_to_blog()
*/
public function reset() {
_deprecated_function( __FUNCTION__, '3.5', 'switch_to_blog()' );
_deprecated_function( __FUNCTION__, '3.5.0', 'switch_to_blog()' );
// Clear out non-global caches since the blog ID has changed.
foreach ( array_keys( $this->cache ) as $group ) {

View File

@ -387,7 +387,7 @@ function wp_dropdown_categories( $args = '' ) {
// Back compat.
if ( isset( $args['type'] ) && 'link' == $args['type'] ) {
/* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
_deprecated_argument( __FUNCTION__, '3.0',
_deprecated_argument( __FUNCTION__, '3.0.0',
sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
'<code>type => link</code>',
'<code>taxonomy => link_category</code>'

View File

@ -42,7 +42,7 @@ function get_categories( $args = '' ) {
// Back compat
if ( isset($args['type']) && 'link' == $args['type'] ) {
/* translators: 1: "type => link", 2: "taxonomy => link_category" alternative */
_deprecated_argument( __FUNCTION__, '3.0',
_deprecated_argument( __FUNCTION__, '3.0.0',
sprintf( __( '%1$s is deprecated. Use %2$s instead.' ),
'<code>type => link</code>',
'<code>taxonomy => link_category</code>'

View File

@ -3,7 +3,7 @@
/**
* Deprecated. Use WP_HTTP (http.php) instead.
*/
_deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/http.php' );
_deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/http.php' );
if ( ! class_exists( 'Snoopy', false ) ) :
/*************************************************

View File

@ -27,7 +27,7 @@ class WP_Admin_Bar {
return is_ssl() ? 'https://' : 'http://';
case 'menu' :
_deprecated_argument( 'WP_Admin_Bar', '3.3', 'Modify admin bar nodes with WP_Admin_Bar::get_node(), WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(), not the <code>menu</code> property.' );
_deprecated_argument( 'WP_Admin_Bar', '3.3.0', 'Modify admin bar nodes with WP_Admin_Bar::get_node(), WP_Admin_Bar::add_node(), and WP_Admin_Bar::remove_node(), not the <code>menu</code> property.' );
return array(); // Sorry, folks.
}
}
@ -127,7 +127,7 @@ class WP_Admin_Bar {
if ( empty( $args['title'] ) )
return;
_doing_it_wrong( __METHOD__, __( 'The menu ID should not be empty.' ), '3.3' );
_doing_it_wrong( __METHOD__, __( 'The menu ID should not be empty.' ), '3.3.0' );
// Deprecated: Generate an ID from the title.
$args['id'] = esc_attr( sanitize_title( trim( $args['title'] ) ) );
}
@ -559,7 +559,7 @@ class WP_Admin_Bar {
* @param object $node
*/
public function recursive_render( $id, $node ) {
_deprecated_function( __METHOD__, '3.3', 'WP_Admin_bar::render(), WP_Admin_Bar::_render_item()' );
_deprecated_function( __METHOD__, '3.3.0', 'WP_Admin_bar::render(), WP_Admin_Bar::_render_item()' );
$this->_render_item( $node );
}

View File

@ -1342,7 +1342,7 @@ final class WP_Customize_Manager {
'<a href="' . esc_url( 'https://developer.wordpress.org/reference/hooks/customize_loaded_components/' ) . '"><code>customize_loaded_components</code></a>'
);
_doing_it_wrong( __METHOD__, $message, '4.5' );
_doing_it_wrong( __METHOD__, $message, '4.5.0' );
}
unset( $this->panels[ $id ] );
}

View File

@ -100,7 +100,7 @@ final class _WP_Editors {
if ( self::$this_tinymce ) {
if ( false !== strpos( $editor_id, '[' ) ) {
self::$this_tinymce = false;
_deprecated_argument( 'wp_editor()', '3.9', 'TinyMCE editor IDs cannot have brackets.' );
_deprecated_argument( 'wp_editor()', '3.9.0', 'TinyMCE editor IDs cannot have brackets.' );
}
}
@ -1310,7 +1310,7 @@ final class _WP_Editors {
* @global int $content_width
*/
public static function wp_fullscreen_html() {
_deprecated_function( __FUNCTION__, '4.3' );
_deprecated_function( __FUNCTION__, '4.3.0' );
}
/**

View File

@ -269,7 +269,7 @@ class WP_User {
*/
public function __isset( $key ) {
if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1',
_deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
@ -299,7 +299,7 @@ class WP_User {
*/
public function __get( $key ) {
if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1',
_deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
@ -338,7 +338,7 @@ class WP_User {
*/
public function __set( $key, $value ) {
if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1',
_deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
@ -362,7 +362,7 @@ class WP_User {
*/
public function __unset( $key ) {
if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1',
_deprecated_argument( 'WP_User->id', '2.1.0',
sprintf(
/* translators: %s: WP_User->ID */
__( 'Use %s instead.' ),
@ -712,7 +712,7 @@ class WP_User {
*/
public function has_cap( $cap ) {
if ( is_numeric( $cap ) ) {
_deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
_deprecated_argument( __FUNCTION__, '2.0.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') );
$cap = $this->translate_level_to_cap( $cap );
}

View File

@ -197,7 +197,7 @@ class WP_Scripts extends WP_Dependencies {
* @return bool|string|void Void if no data exists, extra scripts if `$echo` is true, true otherwise.
*/
public function print_scripts_l10n( $handle, $echo = true ) {
_deprecated_function( __FUNCTION__, '3.3', 'print_extra_script()' );
_deprecated_function( __FUNCTION__, '3.3.0', 'print_extra_script()' );
return $this->print_extra_script( $handle, $echo );
}

View File

@ -825,7 +825,7 @@ function comments_link( $deprecated = '', $deprecated_2 = '' ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '0.72' );
if ( !empty( $deprecated_2 ) )
_deprecated_argument( __FUNCTION__, '1.3' );
_deprecated_argument( __FUNCTION__, '1.3.0' );
echo esc_url( get_comments_link() );
}
@ -870,7 +870,7 @@ function get_comments_number( $post_id = 0 ) {
*/
function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '1.3' );
_deprecated_argument( __FUNCTION__, '1.3.0' );
}
echo get_comments_number_text( $zero, $one, $more );
}
@ -1111,7 +1111,7 @@ function get_trackback_url() {
*/
function trackback_url( $deprecated_echo = true ) {
if ( true !== $deprecated_echo ) {
_deprecated_argument( __FUNCTION__, '2.5',
_deprecated_argument( __FUNCTION__, '2.5.0',
/* translators: %s: get_trackback_url() */
sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
'<code>get_trackback_url()</code>'
@ -1137,7 +1137,7 @@ function trackback_url( $deprecated_echo = true ) {
*/
function trackback_rdf( $deprecated = '' ) {
if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.5' );
_deprecated_argument( __FUNCTION__, '2.5.0' );
}
if ( isset( $_SERVER['HTTP_USER_AGENT'] ) && false !== stripos( $_SERVER['HTTP_USER_AGENT'], 'W3C_Validator' ) ) {

View File

@ -2195,7 +2195,7 @@ function wp_update_comment_count_now($post_id) {
*/
function discover_pingback_server_uri( $url, $deprecated = '' ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.7' );
_deprecated_argument( __FUNCTION__, '2.7.0' );
$pingback_str_dquote = 'rel="pingback"';
$pingback_str_squote = 'rel=\'pingback\'';

View File

@ -191,7 +191,7 @@ function wp_clear_scheduled_hook( $hook, $args = array() ) {
// Backward compatibility
// Previously this function took the arguments as discrete vars rather than an array like the rest of the API
if ( !is_array($args) ) {
_deprecated_argument( __FUNCTION__, '3.0', __('This argument has changed to an array to match the behavior of the other cron functions.') );
_deprecated_argument( __FUNCTION__, '3.0.0', __('This argument has changed to an array to match the behavior of the other cron functions.') );
$args = array_slice( func_get_args(), 1 );
}

File diff suppressed because it is too large Load Diff

View File

@ -8,6 +8,6 @@
* @deprecated 4.5.0 Moved to wp-includes/theme-compat/embed.php
*/
_deprecated_file( basename( __FILE__ ), '4.5', 'wp-includes/theme-compat/embed.php' );
_deprecated_file( basename( __FILE__ ), '4.5.0', 'wp-includes/theme-compat/embed.php' );
include( ABSPATH . WPINC . '/theme-compat/embed.php' );

View File

@ -2851,7 +2851,7 @@ function convert_smilies( $text ) {
*/
function is_email( $email, $deprecated = false ) {
if ( ! empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '3.0' );
_deprecated_argument( __FUNCTION__, '3.0.0' );
// Test for the minimum length the email can be
if ( strlen( $email ) < 3 ) {

View File

@ -646,7 +646,7 @@ function do_enclose( $content, $post_ID ) {
*/
function wp_get_http_headers( $url, $deprecated = false ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.7' );
_deprecated_argument( __FUNCTION__, '2.7.0' );
$response = wp_safe_remote_head( $url );
@ -2115,7 +2115,7 @@ function wp_unique_filename( $dir, $filename, $unique_filename_callback = null )
*/
function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.0' );
_deprecated_argument( __FUNCTION__, '2.0.0' );
if ( empty( $name ) )
return array( 'error' => __( 'Empty filename' ) );
@ -3847,7 +3847,7 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
* For example:
*
* if ( ! empty( $deprecated ) ) {
* _deprecated_argument( __FUNCTION__, '3.0' );
* _deprecated_argument( __FUNCTION__, '3.0.0' );
* }
*
*

View File

@ -43,7 +43,7 @@ function _wp_scripts_maybe_doing_it_wrong( $function ) {
'<code>wp_enqueue_scripts</code>',
'<code>admin_enqueue_scripts</code>',
'<code>login_enqueue_scripts</code>'
), '3.3' );
), '3.3.0' );
}
/**
@ -112,7 +112,7 @@ function wp_add_inline_script( $handle, $data, $position = 'after' ) {
__( 'Do not pass %1$s tags to %2$s.' ),
'<code>&lt;script&gt;</code>',
'<code>wp_add_inline_script()</code>'
), '4.5' );
), '4.5.0' );
$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );
}
@ -226,7 +226,7 @@ function wp_deregister_script( $handle ) {
if ( in_array( $handle, $no ) ) {
$message = sprintf( __( 'Do not deregister the %1$s script in the administration area. To target the front-end theme, use the %2$s hook.' ),
"<code>$handle</code>", '<code>wp_enqueue_scripts</code>' );
_doing_it_wrong( __FUNCTION__, $message, '3.6' );
_doing_it_wrong( __FUNCTION__, $message, '3.6.0' );
return;
}
}

View File

@ -89,7 +89,7 @@ function wp_add_inline_style( $handle, $data ) {
__( 'Do not pass %1$s tags to %2$s.' ),
'<code>&lt;style&gt;</code>',
'<code>wp_add_inline_style()</code>'
), '3.7' );
), '3.7.0' );
$data = trim( preg_replace( '#<style[^>]*>(.*)</style>#is', '$1', $data ) );
}

View File

@ -647,7 +647,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
switch( $show ) {
case 'home' : // DEPRECATED
case 'siteurl' : // DEPRECATED
_deprecated_argument( __FUNCTION__, '2.2', sprintf(
_deprecated_argument( __FUNCTION__, '2.2.0', sprintf(
/* translators: 1: 'siteurl'/'home' argument, 2: bloginfo() function name, 3: 'url' argument */
__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
'<code>' . $show . '</code>',
@ -720,7 +720,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
}
break;
case 'text_direction':
_deprecated_argument( __FUNCTION__, '2.2', sprintf(
_deprecated_argument( __FUNCTION__, '2.2.0', sprintf(
/* translators: 1: 'text_direction' argument, 2: bloginfo() function name, 3: is_rtl() function name */
__( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
'<code>' . $show . '</code>',

View File

@ -700,7 +700,7 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path
if ( false !== $plugin_rel_path ) {
$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
} elseif ( false !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '2.7' );
_deprecated_argument( __FUNCTION__, '2.7.0' );
$path = ABSPATH . trim( $deprecated, '/' );
} else {
$path = WP_PLUGIN_DIR;

View File

@ -1354,7 +1354,7 @@ function edit_post_link( $text = null, $before = '', $after = '', $id = 0, $clas
*/
function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
if ( ! empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '3.0' );
_deprecated_argument( __FUNCTION__, '3.0.0' );
if ( !$post = get_post( $id ) )
return;
@ -1601,7 +1601,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) {
// back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and "
if ( false !== strpos( $excluded_terms, ' and ' ) ) {
_deprecated_argument( __FUNCTION__, '3.3', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) );
_deprecated_argument( __FUNCTION__, '3.3.0', sprintf( __( 'Use commas instead of %s to separate excluded terms.' ), "'and'" ) );
$excluded_terms = explode( ' and ', $excluded_terms );
} else {
$excluded_terms = explode( ',', $excluded_terms );

View File

@ -591,7 +591,7 @@ function wp_get_active_and_valid_plugins() {
// Check for hacks file if the option is enabled
if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) {
_deprecated_file( 'my-hacks.php', '1.5' );
_deprecated_file( 'my-hacks.php', '1.5.0' );
array_unshift( $plugins, ABSPATH . 'my-hacks.php' );
}

View File

@ -729,7 +729,7 @@ function update_blog_option( $id, $option, $value, $deprecated = null ) {
$id = (int) $id;
if ( null !== $deprecated )
_deprecated_argument( __FUNCTION__, '3.1' );
_deprecated_argument( __FUNCTION__, '3.1.0' );
if ( get_current_blog_id() == $id )
return update_option( $option, $value );
@ -963,7 +963,7 @@ function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
global $wpdb;
if ( null !== $deprecated )
_deprecated_argument( __FUNCTION__, '3.1' );
_deprecated_argument( __FUNCTION__, '3.1.0' );
if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )
return $value;

View File

@ -140,7 +140,7 @@ function ms_subdomain_constants() {
if ( $subdomain_error_warn ) {
trigger_error( __( '<strong>Conflicting values for the constants VHOST and SUBDOMAIN_INSTALL.</strong> The value of SUBDOMAIN_INSTALL will be assumed to be your subdomain configuration setting.' ) . ' ' . $vhost_deprecated, E_USER_WARNING );
} else {
_deprecated_argument( 'define()', '3.0', $vhost_deprecated );
_deprecated_argument( 'define()', '3.0.0', $vhost_deprecated );
}
return;
}

View File

@ -24,7 +24,7 @@
* @return int Current site ID.
*/
function get_dashboard_blog() {
_deprecated_function( __FUNCTION__, '3.1' );
_deprecated_function( __FUNCTION__, '3.1.0' );
if ( $blog = get_site_option( 'dashboard_blog' ) )
return get_blog_details( $blog );
@ -41,7 +41,7 @@ function get_dashboard_blog() {
* @param int $len Optional. The length of password to generate. Default 8.
*/
function generate_random_password( $len = 8 ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_generate_password()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_generate_password()' );
return wp_generate_password( $len );
}
@ -61,7 +61,7 @@ function generate_random_password( $len = 8 ) {
* @param string $user_login Optional. Username for the user to check. Default empty.
*/
function is_site_admin( $user_login = '' ) {
_deprecated_function( __FUNCTION__, '3.0', 'is_super_admin()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'is_super_admin()' );
if ( empty( $user_login ) ) {
$user_id = get_current_user_id();
@ -86,7 +86,7 @@ if ( !function_exists( 'graceful_fail' ) ) :
* @see wp_die()
*/
function graceful_fail( $message ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_die()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_die()' );
$message = apply_filters( 'graceful_fail', $message );
$message_template = apply_filters( 'graceful_fail_template',
'<!DOCTYPE html>
@ -126,7 +126,7 @@ endif;
* @param string $username Username.
*/
function get_user_details( $username ) {
_deprecated_function( __FUNCTION__, '3.0', 'get_user_by()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'get_user_by()' );
return get_user_by('login', $username);
}
@ -140,7 +140,7 @@ function get_user_details( $username ) {
* @param int $post_id Post ID.
*/
function clear_global_post_cache( $post_id ) {
_deprecated_function( __FUNCTION__, '3.0', 'clean_post_cache()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'clean_post_cache()' );
}
/**
@ -151,7 +151,7 @@ function clear_global_post_cache( $post_id ) {
* @see is_main_site()
*/
function is_main_blog() {
_deprecated_function( __FUNCTION__, '3.0', 'is_main_site()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'is_main_site()' );
return is_main_site();
}
@ -167,7 +167,7 @@ function is_main_blog() {
* @return string|bool Either false or the valid email address.
*/
function validate_email( $email, $check_domain = true) {
_deprecated_function( __FUNCTION__, '3.0', 'is_email()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'is_email()' );
return is_email( $email, $check_domain );
}
@ -183,7 +183,7 @@ function validate_email( $email, $check_domain = true) {
* @param string $deprecated Unused.
*/
function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) {
_deprecated_function( __FUNCTION__, '3.0', 'wp_get_sites()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_get_sites()' );
global $wpdb;
$blogs = $wpdb->get_results( $wpdb->prepare("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE site_id = %d AND public = '1' AND archived = '0' AND mature = '0' AND spam = '0' AND deleted = '0' ORDER BY registered DESC", $wpdb->siteid), ARRAY_A );
@ -216,7 +216,7 @@ function get_blog_list( $start = 0, $num = 10, $deprecated = '' ) {
* @return array List of "most active" sites.
*/
function get_most_active_blogs( $num = 10, $display = true ) {
_deprecated_function( __FUNCTION__, '3.0' );
_deprecated_function( __FUNCTION__, '3.0.0' );
$blogs = get_blog_list( 0, 'all', false ); // $blog_id -> $details
if ( is_array( $blogs ) ) {
@ -267,7 +267,7 @@ function get_most_active_blogs( $num = 10, $display = true ) {
* @param string $url Optional. Redirect URL. Default empty.
*/
function wpmu_admin_do_redirect( $url = '' ) {
_deprecated_function( __FUNCTION__, '3.3' );
_deprecated_function( __FUNCTION__, '3.3.0' );
$ref = '';
if ( isset( $_GET['ref'] ) )
@ -307,7 +307,7 @@ function wpmu_admin_do_redirect( $url = '' ) {
* @return string
*/
function wpmu_admin_redirect_add_updated_param( $url = '' ) {
_deprecated_function( __FUNCTION__, '3.3' );
_deprecated_function( __FUNCTION__, '3.3.0' );
if ( strpos( $url, 'updated=true' ) === false ) {
if ( strpos( $url, '?' ) === false )
@ -332,7 +332,7 @@ function wpmu_admin_redirect_add_updated_param( $url = '' ) {
* @return int
*/
function get_user_id_from_string( $string ) {
_deprecated_function( __FUNCTION__, '3.6', 'get_user_by()' );
_deprecated_function( __FUNCTION__, '3.6.0', 'get_user_by()' );
if ( is_email( $string ) )
$user = get_user_by( 'email', $string );
@ -357,7 +357,7 @@ function get_user_id_from_string( $string ) {
* @return string
*/
function get_blogaddress_by_domain( $domain, $path ) {
_deprecated_function( __FUNCTION__, '3.7' );
_deprecated_function( __FUNCTION__, '3.7.0' );
if ( is_subdomain_install() ) {
$url = "http://" . $domain.$path;
@ -388,7 +388,7 @@ function get_blogaddress_by_domain( $domain, $path ) {
* @return string|int The ID of the newly created blog
*/
function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) {
_deprecated_function( __FUNCTION__, '4.4' );
_deprecated_function( __FUNCTION__, '4.4.0' );
if ( empty($path) )
$path = '/';
@ -424,7 +424,7 @@ function create_empty_blog( $domain, $path, $weblog_title, $site_id = 1 ) {
* @return array|false The network admins
*/
function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
_deprecated_function( __FUNCTION__, '4.4' );
_deprecated_function( __FUNCTION__, '4.4.0' );
global $wpdb;
@ -469,7 +469,7 @@ function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
function wp_get_sites( $args = array() ) {
global $wpdb;
_deprecated_function( __FUNCTION__, '4.6', 'get_sites()' );
_deprecated_function( __FUNCTION__, '4.6.0', 'get_sites()' );
if ( wp_is_large_network() )
return array();

View File

@ -115,7 +115,7 @@ function get_user_count() {
*/
function get_blog_count( $network_id = 0 ) {
if ( func_num_args() )
_deprecated_argument( __FUNCTION__, '3.1' );
_deprecated_argument( __FUNCTION__, '3.1.0' );
return get_site_option( 'blog_count' );
}

View File

@ -518,7 +518,7 @@ function ms_not_installed( $domain, $path ) {
* @return object
*/
function get_current_site_name( $current_site ) {
_deprecated_function( __FUNCTION__, '3.9', 'get_current_site()' );
_deprecated_function( __FUNCTION__, '3.9.0', 'get_current_site()' );
return $current_site;
}
@ -538,6 +538,6 @@ function get_current_site_name( $current_site ) {
*/
function wpmu_current_site() {
global $current_site;
_deprecated_function( __FUNCTION__, '3.9' );
_deprecated_function( __FUNCTION__, '3.9.0' );
return $current_site;
}

View File

@ -399,7 +399,7 @@ function add_option( $option, $value = '', $deprecated = '', $autoload = 'yes' )
global $wpdb;
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.3' );
_deprecated_argument( __FUNCTION__, '2.3.0' );
$option = trim($option);
if ( empty($option) )

View File

@ -30,7 +30,7 @@ if ( !function_exists('set_current_user') ) :
* @return WP_User returns wp_set_current_user()
*/
function set_current_user($id, $name = '') {
_deprecated_function( __FUNCTION__, '3.0', 'wp_set_current_user()' );
_deprecated_function( __FUNCTION__, '3.0.0', 'wp_set_current_user()' );
return wp_set_current_user($id, $name);
}
endif;
@ -46,7 +46,7 @@ if ( !function_exists('get_currentuserinfo') ) :
* @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
*/
function get_currentuserinfo() {
_deprecated_function( __FUNCTION__, '4.5', 'wp_get_current_user()' );
_deprecated_function( __FUNCTION__, '4.5.0', 'wp_get_current_user()' );
return _wp_get_current_user();
}
@ -64,7 +64,7 @@ if ( !function_exists('get_userdatabylogin') ) :
* @return bool|object False on failure, User DB row object
*/
function get_userdatabylogin($user_login) {
_deprecated_function( __FUNCTION__, '3.3', "get_user_by('login')" );
_deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('login')" );
return get_user_by('login', $user_login);
}
endif;
@ -81,7 +81,7 @@ if ( !function_exists('get_user_by_email') ) :
* @return bool|object False on failure, User DB row object
*/
function get_user_by_email($email) {
_deprecated_function( __FUNCTION__, '3.3', "get_user_by('email')" );
_deprecated_function( __FUNCTION__, '3.3.0', "get_user_by('email')" );
return get_user_by('email', $email);
}
endif;
@ -102,12 +102,12 @@ if ( !function_exists('wp_setcookie') ) :
* @param bool $remember Optional. Remember that the user is logged in
*/
function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) {
_deprecated_function( __FUNCTION__, '2.5', 'wp_set_auth_cookie()' );
_deprecated_function( __FUNCTION__, '2.5.0', 'wp_set_auth_cookie()' );
$user = get_user_by('login', $username);
wp_set_auth_cookie($user->ID, $remember);
}
else :
_deprecated_function( 'wp_setcookie', '2.5', 'wp_set_auth_cookie()' );
_deprecated_function( 'wp_setcookie', '2.5.0', 'wp_set_auth_cookie()' );
endif;
if ( !function_exists('wp_clearcookie') ) :
@ -119,11 +119,11 @@ if ( !function_exists('wp_clearcookie') ) :
* @see wp_clear_auth_cookie()
*/
function wp_clearcookie() {
_deprecated_function( __FUNCTION__, '2.5', 'wp_clear_auth_cookie()' );
_deprecated_function( __FUNCTION__, '2.5.0', 'wp_clear_auth_cookie()' );
wp_clear_auth_cookie();
}
else :
_deprecated_function( 'wp_clearcookie', '2.5', 'wp_clear_auth_cookie()' );
_deprecated_function( 'wp_clearcookie', '2.5.0', 'wp_clear_auth_cookie()' );
endif;
if ( !function_exists('wp_get_cookie_login') ):
@ -139,11 +139,11 @@ if ( !function_exists('wp_get_cookie_login') ):
* @return bool Always returns false
*/
function wp_get_cookie_login() {
_deprecated_function( __FUNCTION__, '2.5' );
_deprecated_function( __FUNCTION__, '2.5.0' );
return false;
}
else :
_deprecated_function( 'wp_get_cookie_login', '2.5' );
_deprecated_function( 'wp_get_cookie_login', '2.5.0' );
endif;
if ( !function_exists('wp_login') ) :
@ -169,7 +169,7 @@ if ( !function_exists('wp_login') ) :
* @return bool False on login failure, true on successful check
*/
function wp_login($username, $password, $deprecated = '') {
_deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' );
_deprecated_function( __FUNCTION__, '2.5.0', 'wp_signon()' );
global $error;
$user = wp_authenticate($username, $password);
@ -181,7 +181,7 @@ function wp_login($username, $password, $deprecated = '') {
return false;
}
else :
_deprecated_function( 'wp_login', '2.5', 'wp_signon()' );
_deprecated_function( 'wp_login', '2.5.0', 'wp_signon()' );
endif;
/**
@ -198,11 +198,11 @@ endif;
if ( ! class_exists( 'wp_atom_server', false ) ) {
class wp_atom_server {
public function __call( $name, $arguments ) {
_deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
}
public static function __callStatic( $name, $arguments ) {
_deprecated_function( __CLASS__ . '::' . $name, '3.5', 'the Atom Publishing Protocol plugin' );
_deprecated_function( __CLASS__ . '::' . $name, '3.5.0', 'the Atom Publishing Protocol plugin' );
}
}
}

View File

@ -1047,7 +1047,7 @@ if ( !function_exists('check_admin_referer') ) :
*/
function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
if ( -1 == $action )
_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2' );
_doing_it_wrong( __FUNCTION__, __( 'You should specify a nonce action to be verified by using the first parameter.' ), '3.2.0' );
$adminurl = strtolower(admin_url());
$referer = strtolower(wp_get_referer());
@ -1348,7 +1348,7 @@ if ( ! function_exists('wp_notify_postauthor') ) :
*/
function wp_notify_postauthor( $comment_id, $deprecated = null ) {
if ( null !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '3.8' );
_deprecated_argument( __FUNCTION__, '3.8.0' );
}
$comment = get_comment( $comment_id );

View File

@ -885,7 +885,7 @@ function register_deactivation_hook($file, $function) {
*/
function register_uninstall_hook( $file, $callback ) {
if ( is_array( $callback ) && is_object( $callback[0] ) ) {
_doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1' );
_doing_it_wrong( __FUNCTION__, __( 'Only a static class method or function can be used in an uninstall hook.' ), '3.1.0' );
return;
}

View File

@ -373,7 +373,7 @@ function the_excerpt() {
*/
function get_the_excerpt( $post = null ) {
if ( is_bool( $post ) ) {
_deprecated_argument( __FUNCTION__, '2.3' );
_deprecated_argument( __FUNCTION__, '2.3.0' );
}
$post = get_post( $post );
@ -1417,7 +1417,7 @@ function walk_page_dropdown_tree() {
*/
function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.5' );
_deprecated_argument( __FUNCTION__, '2.5.0' );
if ( $fullsize )
echo wp_get_attachment_link($id, 'full', $permalink);
@ -1724,7 +1724,7 @@ function wp_list_post_revisions( $post_id = 0, $type = 'all' ) {
// $args array with (parent, format, right, left, type) deprecated since 3.6
if ( is_array( $type ) ) {
$type = ! empty( $type['type'] ) ? $type['type'] : $type;
_deprecated_argument( __FUNCTION__, '3.6' );
_deprecated_argument( __FUNCTION__, '3.6.0' );
}
if ( ! $revisions = wp_get_post_revisions( $post->ID ) )

View File

@ -1023,7 +1023,7 @@ function register_post_type( $post_type, $args = array() ) {
$post_type = sanitize_key( $post_type );
if ( empty( $post_type ) || strlen( $post_type ) > 20 ) {
_doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2' );
_doing_it_wrong( __FUNCTION__, __( 'Post type names must be between 1 and 20 characters in length.' ), '4.2.0' );
return new WP_Error( 'post_type_length_invalid', __( 'Post type names must be between 1 and 20 characters in length.' ) );
}
@ -2777,7 +2777,7 @@ function wp_get_post_terms( $post_id = 0, $taxonomy = 'post_tag', $args = array(
function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
if ( is_numeric( $args ) ) {
_deprecated_argument( __FUNCTION__, '3.1', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
_deprecated_argument( __FUNCTION__, '3.1.0', __( 'Passing an integer number of posts is deprecated. Pass an array of arguments instead.' ) );
$args = array( 'numberposts' => absint( $args ) );
}

View File

@ -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;
}

View File

@ -4,4 +4,4 @@
*
* @package WordPress
*/
_deprecated_file( basename(__FILE__), '2.1', null, __( 'This file no longer needs to be included.' ) );
_deprecated_file( basename(__FILE__), '2.1.0', null, __( 'This file no longer needs to be included.' ) );

View File

@ -4,4 +4,4 @@
*
* @package WordPress
*/
_deprecated_file( basename(__FILE__), '3.1', null, __( 'This file no longer needs to be included.' ) );
_deprecated_file( basename(__FILE__), '3.1.0', null, __( 'This file no longer needs to be included.' ) );

View File

@ -5,5 +5,5 @@
* @package WordPress
*/
_deprecated_file( basename(__FILE__), '2.1', WPINC . '/rss.php' );
_deprecated_file( basename(__FILE__), '2.1.0', WPINC . '/rss.php' );
require_once( ABSPATH . WPINC . '/rss.php' );

View File

@ -16,7 +16,7 @@
/**
* Deprecated. Use SimplePie (class-simplepie.php) instead.
*/
_deprecated_file( basename( __FILE__ ), '3.0', WPINC . '/class-simplepie.php' );
_deprecated_file( basename( __FILE__ ), '3.0.0', WPINC . '/class-simplepie.php' );
/**
* Fires before MagpieRSS is loaded, to optionally replace it.

View File

@ -389,7 +389,7 @@ function register_taxonomy( $taxonomy, $object_type, $args = array() ) {
$args = array_merge( $defaults, $args );
if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) {
_doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2' );
_doing_it_wrong( __FUNCTION__, __( 'Taxonomy names must be between 1 and 32 characters in length.' ), '4.2.0' );
return new WP_Error( 'taxonomy_length_invalid', __( 'Taxonomy names must be between 1 and 32 characters in length.' ) );
}

View File

@ -2,7 +2,7 @@
/**
* @package WordPress
* @subpackage Theme_Compat
* @deprecated 3.0
* @deprecated 3.0.0
*
* This file is here for backward compatibility with old themes and will be removed in a future version
*
@ -10,7 +10,7 @@
_deprecated_file(
/* translators: %s: template name */
sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
'3.0',
'3.0.0',
null,
/* translators: %s: template name */
sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )

View File

@ -2,14 +2,14 @@
/**
* @package WordPress
* @subpackage Theme_Compat
* @deprecated 3.0
* @deprecated 3.0.0
*
* This file is here for backward compatibility with old themes and will be removed in a future version
*/
_deprecated_file(
/* translators: %s: template name */
sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
'3.0',
'3.0.0',
null,
/* translators: %s: template name */
sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )

View File

@ -2,14 +2,14 @@
/**
* @package WordPress
* @subpackage Theme_Compat
* @deprecated 3.0
* @deprecated 3.0.0
*
* This file is here for backward compatibility with old themes and will be removed in a future version.
*/
_deprecated_file(
/* translators: %s: template name */
sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
'3.0',
'3.0.0',
null,
/* translators: %s: template name */
sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )

View File

@ -2,14 +2,14 @@
/**
* @package WordPress
* @subpackage Theme_Compat
* @deprecated 3.0
* @deprecated 3.0.0
*
* This file is here for backward compatibility with old themes and will be removed in a future version.
*/
_deprecated_file(
/* translators: %s: template name */
sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
'3.0',
'3.0.0',
null,
/* translators: %s: template name */
sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )

View File

@ -1726,7 +1726,7 @@ function add_theme_support( $feature ) {
if ( did_action( 'wp_loaded' ) ) {
/* translators: 1: Theme support 2: hook name */
_doing_it_wrong( "add_theme_support( 'title-tag' )", sprintf( __( 'Theme support for %1$s should be registered before the %2$s hook.' ),
'<code>title-tag</code>', '<code>wp_loaded</code>' ), '4.1' );
'<code>title-tag</code>', '<code>wp_loaded</code>' ), '4.1.0' );
return false;
}

View File

@ -452,7 +452,7 @@ function get_user_option( $option, $user = 0, $deprecated = '' ) {
global $wpdb;
if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '3.0' );
_deprecated_argument( __FUNCTION__, '3.0.0' );
if ( empty( $user ) )
$user = get_current_user_id();

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.6-beta1-37984';
$wp_version = '4.6-beta1-37985';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

View File

@ -173,6 +173,6 @@ class WP_Widget_Recent_Comments extends WP_Widget {
* @deprecated 4.4.0 Fragment caching was removed in favor of split queries.
*/
public function flush_widget_cache() {
_deprecated_function( __METHOD__, '4.4' );
_deprecated_function( __METHOD__, '4.4.0' );
}
}

View File

@ -1135,7 +1135,7 @@ class wpdb {
*/
function _weak_escape( $string ) {
if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) )
_deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' );
_deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
return addslashes( $string );
}
@ -1209,7 +1209,7 @@ class wpdb {
*/
public function escape( $data ) {
if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) )
_deprecated_function( __METHOD__, '3.6', 'wpdb::prepare() or esc_sql()' );
_deprecated_function( __METHOD__, '3.6.0', 'wpdb::prepare() or esc_sql()' );
if ( is_array( $data ) ) {
foreach ( $data as $k => $v ) {
if ( is_array( $v ) )
@ -1278,7 +1278,7 @@ class wpdb {
// This is not meant to be foolproof -- but it will catch obviously incorrect usage.
if ( strpos( $query, '%' ) === false ) {
_doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9' );
_doing_it_wrong( 'wpdb::prepare', sprintf( __( 'The query argument of %s must have a placeholder.' ), 'wpdb::prepare()' ), '3.9.0' );
}
$args = func_get_args();
@ -3210,7 +3210,7 @@ class wpdb {
* @return bool True if collation is supported, false if version does not
*/
public function supports_collation() {
_deprecated_function( __FUNCTION__, '3.5', 'wpdb::has_cap( \'collation\' )' );
_deprecated_function( __FUNCTION__, '3.5.0', 'wpdb::has_cap( \'collation\' )' );
return $this->has_cap( 'collation' );
}

View File

@ -95,7 +95,7 @@ exit;
* @param string $msg Information describing logging reason.
*/
function logIO( $io, $msg ) {
_deprecated_function( __FUNCTION__, '3.4', 'error_log()' );
_deprecated_function( __FUNCTION__, '3.4.0', 'error_log()' );
if ( ! empty( $GLOBALS['xmlrpc_logging'] ) )
error_log( $io . ' - ' . $msg );
}