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:
Sergey Biryukov 2016-07-06 12:39:01 +00:00
parent 50007cf37d
commit 920f29616a
63 changed files with 384 additions and 384 deletions

View File

@ -9,7 +9,7 @@
* @subpackage Administration * @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. */ /** WordPress Administration API: Includes all Administration functions. */
require_once(ABSPATH . 'wp-admin/includes/admin.php'); 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. * @return string The location of the remote path.
*/ */
public function find_base_dir( $base = '.', $echo = false ) { 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; $this->verbose = $echo;
return $this->abspath(); return $this->abspath();
} }
@ -161,7 +161,7 @@ class WP_Filesystem_Base {
* @return string The location of the remote path. * @return string The location of the remote path.
*/ */
public function get_base_dir( $base = '.', $echo = false ) { 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; $this->verbose = $echo;
return $this->abspath(); return $this->abspath();
} }

View File

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

View File

@ -256,7 +256,7 @@ function wp_stream_image( $image, $mime_type, $post_id ) {
return true; return true;
} else { } 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. * 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 ); return $image->save( $filename, $mime_type );
} else { } 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 */ /** This filter is documented in wp-admin/includes/image-edit.php */
$image = apply_filters( 'image_save_pre', $image, $post_id ); $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. * @return resource|false GD image resource, false otherwise.
*/ */
function _rotate_image_resource($img, $angle) { 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') ) { if ( function_exists('imagerotate') ) {
$rotated = imagerotate($img, $angle, 0); $rotated = imagerotate($img, $angle, 0);
if ( is_resource($rotated) ) { if ( is_resource($rotated) ) {
@ -410,7 +410,7 @@ function _rotate_image_resource($img, $angle) {
* @return resource (maybe) flipped image resource. * @return resource (maybe) flipped image resource.
*/ */
function _flip_image_resource($img, $horz, $vert) { 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); $w = imagesx($img);
$h = imagesy($img); $h = imagesy($img);
$dst = wp_imagecreatetruecolor($w, $h); $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 ) { function image_edit_apply_changes( $image, $changes ) {
if ( is_resource( $image ) ) 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) ) if ( !is_array($changes) )
return $image; return $image;

View File

@ -1013,7 +1013,7 @@ function xfn_check( $class, $value = '', $deprecated = '' ) {
global $link; global $link;
if ( !empty( $deprecated ) ) 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 ?: ''; $link_rel = isset( $link->link_rel ) ? $link->link_rel : ''; // In PHP 5.3: $link_rel = $link->link_rel ?: '';
$rels = preg_split('/\s+/', $link_rel); $rels = preg_split('/\s+/', $link_rel);

View File

@ -16,7 +16,7 @@
* @deprecated 3.0.0 * @deprecated 3.0.0
*/ */
function wpmu_menu() { function wpmu_menu() {
_deprecated_function(__FUNCTION__, '3.0' ); _deprecated_function(__FUNCTION__, '3.0.0' );
// Deprecated. See #11763. // Deprecated. See #11763.
} }
@ -27,7 +27,7 @@ function wpmu_menu() {
* @see is_upload_space_available() * @see is_upload_space_available()
*/ */
function wpmu_checkAvailableSpace() { 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() ) if ( !is_upload_space_available() )
wp_die( __('Sorry, you must delete files before you can upload any more.') ); wp_die( __('Sorry, you must delete files before you can upload any more.') );
@ -39,7 +39,7 @@ function wpmu_checkAvailableSpace() {
* @deprecated 3.0.0 * @deprecated 3.0.0
*/ */
function mu_options( $options ) { function mu_options( $options ) {
_deprecated_function(__FUNCTION__, '3.0' ); _deprecated_function(__FUNCTION__, '3.0.0' );
return $options; return $options;
} }
@ -50,7 +50,7 @@ function mu_options( $options ) {
* @see activate_plugin() * @see activate_plugin()
*/ */
function activate_sitewide_plugin() { function activate_sitewide_plugin() {
_deprecated_function(__FUNCTION__, '3.0', 'activate_plugin()' ); _deprecated_function(__FUNCTION__, '3.0.0', 'activate_plugin()' );
return false; return false;
} }
@ -61,7 +61,7 @@ function activate_sitewide_plugin() {
* @see deactivate_sitewide_plugin() * @see deactivate_sitewide_plugin()
*/ */
function deactivate_sitewide_plugin( $plugin = false ) { 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() * @see is_network_only_plugin()
*/ */
function is_wpmu_sitewide_plugin( $file ) { 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 ); return is_network_only_plugin( $file );
} }
@ -82,7 +82,7 @@ function is_wpmu_sitewide_plugin( $file ) {
* @see WP_Theme::get_allowed_on_network() * @see WP_Theme::get_allowed_on_network()
*/ */
function get_site_allowed_themes() { 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() ); 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() * @see WP_Theme::get_allowed_on_site()
*/ */
function wpmu_get_blog_allowedthemes( $blog_id = 0 ) { 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 ) ); 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; global $wpdb;
if ( null !== $deprecated ) 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 ) ); $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 // Site Wide Only is the old header for Network
if ( ! $plugin_data['Network'] && $plugin_data['_sitewide'] ) { if ( ! $plugin_data['Network'] && $plugin_data['_sitewide'] ) {
/* translators: 1: Site Wide Only: true, 2: Network: true */ /* 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'] = $plugin_data['_sitewide'];
} }
$plugin_data['Network'] = ( 'true' == strtolower( $plugin_data['Network'] ) ); $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; global $new_whitelist_options;
if ( 'misc' == $option_group ) { 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'; $option_group = 'general';
} }
if ( 'privacy' == $option_group ) { 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'; $option_group = 'reading';
} }
@ -1806,12 +1806,12 @@ function unregister_setting( $option_group, $option_name, $sanitize_callback = '
global $new_whitelist_options; global $new_whitelist_options;
if ( 'misc' == $option_group ) { 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'; $option_group = 'general';
} }
if ( 'privacy' == $option_group ) { 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'; $option_group = 'reading';
} }

View File

@ -1204,12 +1204,12 @@ function add_settings_section($id, $title, $callback, $page) {
global $wp_settings_sections; global $wp_settings_sections;
if ( 'misc' == $page ) { 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'; $page = 'general';
} }
if ( 'privacy' == $page ) { 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'; $page = 'reading';
} }
@ -1255,12 +1255,12 @@ function add_settings_field($id, $title, $callback, $page, $section = 'default',
global $wp_settings_fields; global $wp_settings_fields;
if ( 'misc' == $page ) { 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'; $page = 'general';
} }
if ( 'privacy' == $page ) { 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'; $page = 'reading';
} }
@ -1996,7 +1996,7 @@ function _wp_admin_html_begin() {
*/ */
function convert_to_screen( $hook_name ) { function convert_to_screen( $hook_name ) {
if ( ! class_exists( 'WP_Screen', false ) ) { 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' ); 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 * @return array
*/ */
function install_themes_feature_list() { 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' ) ) if ( !$cache = get_transient( 'wporg_theme_feature_list' ) )
set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS ); set_transient( 'wporg_theme_feature_list', array(), 3 * HOUR_IN_SECONDS );
@ -160,7 +160,7 @@ function install_themes_upload() {
* @param object $theme * @param object $theme
*/ */
function display_theme( $theme ) { function display_theme( $theme ) {
_deprecated_function( __FUNCTION__, '3.4' ); _deprecated_function( __FUNCTION__, '3.4.0' );
global $wp_list_table; global $wp_list_table;
if ( ! isset( $wp_list_table ) ) { if ( ! isset( $wp_list_table ) ) {
$wp_list_table = _get_list_table('WP_Theme_Install_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 = '' ) { function wp_install( $blog_title, $user_name, $user_email, $public, $deprecated = '', $user_password = '', $language = '' ) {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.6' ); _deprecated_argument( __FUNCTION__, '2.6.0' );
wp_check_mysql_version(); wp_check_mysql_version();
wp_cache_flush(); wp_cache_flush();

View File

@ -353,7 +353,7 @@ if ( ! empty( $languages ) || ! empty( $translations ) ) {
</p> </p>
<?php <?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> </td>

View File

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

View File

@ -8,5 +8,5 @@
* @subpackage Administration * @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'); require_once(ABSPATH . 'wp-admin/includes/upgrade.php');

View File

@ -24,7 +24,7 @@ function get_the_author($deprecated = '') {
global $authordata; global $authordata;
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.1' ); _deprecated_argument( __FUNCTION__, '2.1.0' );
/** /**
* Filters the display name of the current post's author. * 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 ) { function the_author( $deprecated = '', $deprecated_echo = true ) {
if ( ! empty( $deprecated ) ) { if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.1' ); _deprecated_argument( __FUNCTION__, '2.1.0' );
} }
if ( true !== $deprecated_echo ) { if ( true !== $deprecated_echo ) {
_deprecated_argument( __FUNCTION__, '1.5', _deprecated_argument( __FUNCTION__, '1.5.0',
/* translators: %s: get_the_author() */ /* translators: %s: get_the_author() */
sprintf( __( 'Use %s instead if you do not want the value echoed.' ), sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
'<code>get_the_author()</code>' '<code>get_the_author()</code>'
@ -277,7 +277,7 @@ function get_the_author_posts_link() {
*/ */
function the_author_posts_link( $deprecated = '' ) { function the_author_posts_link( $deprecated = '' ) {
if ( ! empty( $deprecated ) ) { if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '2.1' ); _deprecated_argument( __FUNCTION__, '2.1.0' );
} }
echo get_the_author_posts_link(); 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. * @global WP_Object_Cache $wp_object_cache Object cache global instance.
*/ */
function wp_cache_reset() { function wp_cache_reset() {
_deprecated_function( __FUNCTION__, '3.5' ); _deprecated_function( __FUNCTION__, '3.5.0' );
global $wp_object_cache; global $wp_object_cache;
@ -631,7 +631,7 @@ class WP_Object_Cache {
* @see switch_to_blog() * @see switch_to_blog()
*/ */
public function reset() { 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. // Clear out non-global caches since the blog ID has changed.
foreach ( array_keys( $this->cache ) as $group ) { foreach ( array_keys( $this->cache ) as $group ) {

View File

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

View File

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

View File

@ -3,7 +3,7 @@
/** /**
* Deprecated. Use WP_HTTP (http.php) instead. * 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 ) ) : if ( ! class_exists( 'Snoopy', false ) ) :
/************************************************* /*************************************************

View File

@ -27,7 +27,7 @@ class WP_Admin_Bar {
return is_ssl() ? 'https://' : 'http://'; return is_ssl() ? 'https://' : 'http://';
case 'menu' : 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. return array(); // Sorry, folks.
} }
} }
@ -127,7 +127,7 @@ class WP_Admin_Bar {
if ( empty( $args['title'] ) ) if ( empty( $args['title'] ) )
return; 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. // Deprecated: Generate an ID from the title.
$args['id'] = esc_attr( sanitize_title( trim( $args['title'] ) ) ); $args['id'] = esc_attr( sanitize_title( trim( $args['title'] ) ) );
} }
@ -559,7 +559,7 @@ class WP_Admin_Bar {
* @param object $node * @param object $node
*/ */
public function recursive_render( $id, $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 ); $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>' '<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 ] ); unset( $this->panels[ $id ] );
} }

View File

@ -100,7 +100,7 @@ final class _WP_Editors {
if ( self::$this_tinymce ) { if ( self::$this_tinymce ) {
if ( false !== strpos( $editor_id, '[' ) ) { if ( false !== strpos( $editor_id, '[' ) ) {
self::$this_tinymce = false; 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 * @global int $content_width
*/ */
public static function wp_fullscreen_html() { 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 ) { public function __isset( $key ) {
if ( 'id' == $key ) { if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1', _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf( sprintf(
/* translators: %s: WP_User->ID */ /* translators: %s: WP_User->ID */
__( 'Use %s instead.' ), __( 'Use %s instead.' ),
@ -299,7 +299,7 @@ class WP_User {
*/ */
public function __get( $key ) { public function __get( $key ) {
if ( 'id' == $key ) { if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1', _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf( sprintf(
/* translators: %s: WP_User->ID */ /* translators: %s: WP_User->ID */
__( 'Use %s instead.' ), __( 'Use %s instead.' ),
@ -338,7 +338,7 @@ class WP_User {
*/ */
public function __set( $key, $value ) { public function __set( $key, $value ) {
if ( 'id' == $key ) { if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1', _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf( sprintf(
/* translators: %s: WP_User->ID */ /* translators: %s: WP_User->ID */
__( 'Use %s instead.' ), __( 'Use %s instead.' ),
@ -362,7 +362,7 @@ class WP_User {
*/ */
public function __unset( $key ) { public function __unset( $key ) {
if ( 'id' == $key ) { if ( 'id' == $key ) {
_deprecated_argument( 'WP_User->id', '2.1', _deprecated_argument( 'WP_User->id', '2.1.0',
sprintf( sprintf(
/* translators: %s: WP_User->ID */ /* translators: %s: WP_User->ID */
__( 'Use %s instead.' ), __( 'Use %s instead.' ),
@ -712,7 +712,7 @@ class WP_User {
*/ */
public function has_cap( $cap ) { public function has_cap( $cap ) {
if ( is_numeric( $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 ); $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. * @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 ) { 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 ); return $this->print_extra_script( $handle, $echo );
} }

View File

@ -825,7 +825,7 @@ function comments_link( $deprecated = '', $deprecated_2 = '' ) {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '0.72' ); _deprecated_argument( __FUNCTION__, '0.72' );
if ( !empty( $deprecated_2 ) ) if ( !empty( $deprecated_2 ) )
_deprecated_argument( __FUNCTION__, '1.3' ); _deprecated_argument( __FUNCTION__, '1.3.0' );
echo esc_url( get_comments_link() ); 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 = '' ) { function comments_number( $zero = false, $one = false, $more = false, $deprecated = '' ) {
if ( ! empty( $deprecated ) ) { if ( ! empty( $deprecated ) ) {
_deprecated_argument( __FUNCTION__, '1.3' ); _deprecated_argument( __FUNCTION__, '1.3.0' );
} }
echo get_comments_number_text( $zero, $one, $more ); echo get_comments_number_text( $zero, $one, $more );
} }
@ -1111,7 +1111,7 @@ function get_trackback_url() {
*/ */
function trackback_url( $deprecated_echo = true ) { function trackback_url( $deprecated_echo = true ) {
if ( true !== $deprecated_echo ) { if ( true !== $deprecated_echo ) {
_deprecated_argument( __FUNCTION__, '2.5', _deprecated_argument( __FUNCTION__, '2.5.0',
/* translators: %s: get_trackback_url() */ /* translators: %s: get_trackback_url() */
sprintf( __( 'Use %s instead if you do not want the value echoed.' ), sprintf( __( 'Use %s instead if you do not want the value echoed.' ),
'<code>get_trackback_url()</code>' '<code>get_trackback_url()</code>'
@ -1137,7 +1137,7 @@ function trackback_url( $deprecated_echo = true ) {
*/ */
function trackback_rdf( $deprecated = '' ) { function trackback_rdf( $deprecated = '' ) {
if ( ! empty( $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' ) ) { 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 = '' ) { function discover_pingback_server_uri( $url, $deprecated = '' ) {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.7' ); _deprecated_argument( __FUNCTION__, '2.7.0' );
$pingback_str_dquote = 'rel="pingback"'; $pingback_str_dquote = 'rel="pingback"';
$pingback_str_squote = 'rel=\'pingback\''; $pingback_str_squote = 'rel=\'pingback\'';

View File

@ -191,7 +191,7 @@ function wp_clear_scheduled_hook( $hook, $args = array() ) {
// Backward compatibility // Backward compatibility
// Previously this function took the arguments as discrete vars rather than an array like the rest of the API // Previously this function took the arguments as discrete vars rather than an array like the rest of the API
if ( !is_array($args) ) { 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 ); $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 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' ); include( ABSPATH . WPINC . '/theme-compat/embed.php' );

View File

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

View File

@ -646,7 +646,7 @@ function do_enclose( $content, $post_ID ) {
*/ */
function wp_get_http_headers( $url, $deprecated = false ) { function wp_get_http_headers( $url, $deprecated = false ) {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.7' ); _deprecated_argument( __FUNCTION__, '2.7.0' );
$response = wp_safe_remote_head( $url ); $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 ) { function wp_upload_bits( $name, $deprecated, $bits, $time = null ) {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.0' ); _deprecated_argument( __FUNCTION__, '2.0.0' );
if ( empty( $name ) ) if ( empty( $name ) )
return array( 'error' => __( 'Empty filename' ) ); return array( 'error' => __( 'Empty filename' ) );
@ -3847,7 +3847,7 @@ function _deprecated_file( $file, $version, $replacement = null, $message = '' )
* For example: * For example:
* *
* if ( ! empty( $deprecated ) ) { * 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>wp_enqueue_scripts</code>',
'<code>admin_enqueue_scripts</code>', '<code>admin_enqueue_scripts</code>',
'<code>login_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.' ), __( 'Do not pass %1$s tags to %2$s.' ),
'<code>&lt;script&gt;</code>', '<code>&lt;script&gt;</code>',
'<code>wp_add_inline_script()</code>' '<code>wp_add_inline_script()</code>'
), '4.5' ); ), '4.5.0' );
$data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) ); $data = trim( preg_replace( '#<script[^>]*>(.*)</script>#is', '$1', $data ) );
} }
@ -226,7 +226,7 @@ function wp_deregister_script( $handle ) {
if ( in_array( $handle, $no ) ) { 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.' ), $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>' ); "<code>$handle</code>", '<code>wp_enqueue_scripts</code>' );
_doing_it_wrong( __FUNCTION__, $message, '3.6' ); _doing_it_wrong( __FUNCTION__, $message, '3.6.0' );
return; return;
} }
} }

View File

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

View File

@ -647,7 +647,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
switch( $show ) { switch( $show ) {
case 'home' : // DEPRECATED case 'home' : // DEPRECATED
case 'siteurl' : // 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 */ /* 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.' ), __( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s option instead.' ),
'<code>' . $show . '</code>', '<code>' . $show . '</code>',
@ -720,7 +720,7 @@ function get_bloginfo( $show = '', $filter = 'raw' ) {
} }
break; break;
case 'text_direction': 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 */ /* 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.' ), __( 'The %1$s option is deprecated for the family of %2$s functions. Use the %3$s function instead.' ),
'<code>' . $show . '</code>', '<code>' . $show . '</code>',

View File

@ -700,7 +700,7 @@ function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path
if ( false !== $plugin_rel_path ) { if ( false !== $plugin_rel_path ) {
$path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' ); $path = WP_PLUGIN_DIR . '/' . trim( $plugin_rel_path, '/' );
} elseif ( false !== $deprecated ) { } elseif ( false !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '2.7' ); _deprecated_argument( __FUNCTION__, '2.7.0' );
$path = ABSPATH . trim( $deprecated, '/' ); $path = ABSPATH . trim( $deprecated, '/' );
} else { } else {
$path = WP_PLUGIN_DIR; $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 ) { function get_delete_post_link( $id = 0, $deprecated = '', $force_delete = false ) {
if ( ! empty( $deprecated ) ) if ( ! empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '3.0' ); _deprecated_argument( __FUNCTION__, '3.0.0' );
if ( !$post = get_post( $id ) ) if ( !$post = get_post( $id ) )
return; return;
@ -1601,7 +1601,7 @@ function get_adjacent_post( $in_same_term = false, $excluded_terms = '', $previo
if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) { if ( ! empty( $excluded_terms ) && ! is_array( $excluded_terms ) ) {
// back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and " // back-compat, $excluded_terms used to be $excluded_terms with IDs separated by " and "
if ( false !== strpos( $excluded_terms, ' 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 ); $excluded_terms = explode( ' and ', $excluded_terms );
} else { } else {
$excluded_terms = explode( ',', $excluded_terms ); $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 // Check for hacks file if the option is enabled
if ( get_option( 'hack_file' ) && file_exists( ABSPATH . 'my-hacks.php' ) ) { 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' ); 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; $id = (int) $id;
if ( null !== $deprecated ) if ( null !== $deprecated )
_deprecated_argument( __FUNCTION__, '3.1' ); _deprecated_argument( __FUNCTION__, '3.1.0' );
if ( get_current_blog_id() == $id ) if ( get_current_blog_id() == $id )
return update_option( $option, $value ); return update_option( $option, $value );
@ -963,7 +963,7 @@ function update_blog_status( $blog_id, $pref, $value, $deprecated = null ) {
global $wpdb; global $wpdb;
if ( null !== $deprecated ) 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') ) ) if ( ! in_array( $pref, array( 'site_id', 'domain', 'path', 'registered', 'last_updated', 'public', 'archived', 'mature', 'spam', 'deleted', 'lang_id') ) )
return $value; return $value;

View File

@ -140,7 +140,7 @@ function ms_subdomain_constants() {
if ( $subdomain_error_warn ) { 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 ); 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 { } else {
_deprecated_argument( 'define()', '3.0', $vhost_deprecated ); _deprecated_argument( 'define()', '3.0.0', $vhost_deprecated );
} }
return; return;
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -30,7 +30,7 @@ if ( !function_exists('set_current_user') ) :
* @return WP_User returns wp_set_current_user() * @return WP_User returns wp_set_current_user()
*/ */
function set_current_user($id, $name = '') { 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); return wp_set_current_user($id, $name);
} }
endif; 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. * @return bool|WP_User False on XMLRPC Request and invalid auth cookie, WP_User instance otherwise.
*/ */
function get_currentuserinfo() { 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(); return _wp_get_current_user();
} }
@ -64,7 +64,7 @@ if ( !function_exists('get_userdatabylogin') ) :
* @return bool|object False on failure, User DB row object * @return bool|object False on failure, User DB row object
*/ */
function get_userdatabylogin($user_login) { 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); return get_user_by('login', $user_login);
} }
endif; endif;
@ -81,7 +81,7 @@ if ( !function_exists('get_user_by_email') ) :
* @return bool|object False on failure, User DB row object * @return bool|object False on failure, User DB row object
*/ */
function get_user_by_email($email) { 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); return get_user_by('email', $email);
} }
endif; endif;
@ -102,12 +102,12 @@ if ( !function_exists('wp_setcookie') ) :
* @param bool $remember Optional. Remember that the user is logged in * @param bool $remember Optional. Remember that the user is logged in
*/ */
function wp_setcookie($username, $password = '', $already_md5 = false, $home = '', $siteurl = '', $remember = false) { 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); $user = get_user_by('login', $username);
wp_set_auth_cookie($user->ID, $remember); wp_set_auth_cookie($user->ID, $remember);
} }
else : else :
_deprecated_function( 'wp_setcookie', '2.5', 'wp_set_auth_cookie()' ); _deprecated_function( 'wp_setcookie', '2.5.0', 'wp_set_auth_cookie()' );
endif; endif;
if ( !function_exists('wp_clearcookie') ) : if ( !function_exists('wp_clearcookie') ) :
@ -119,11 +119,11 @@ if ( !function_exists('wp_clearcookie') ) :
* @see wp_clear_auth_cookie() * @see wp_clear_auth_cookie()
*/ */
function wp_clearcookie() { 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(); wp_clear_auth_cookie();
} }
else : else :
_deprecated_function( 'wp_clearcookie', '2.5', 'wp_clear_auth_cookie()' ); _deprecated_function( 'wp_clearcookie', '2.5.0', 'wp_clear_auth_cookie()' );
endif; endif;
if ( !function_exists('wp_get_cookie_login') ): if ( !function_exists('wp_get_cookie_login') ):
@ -139,11 +139,11 @@ if ( !function_exists('wp_get_cookie_login') ):
* @return bool Always returns false * @return bool Always returns false
*/ */
function wp_get_cookie_login() { function wp_get_cookie_login() {
_deprecated_function( __FUNCTION__, '2.5' ); _deprecated_function( __FUNCTION__, '2.5.0' );
return false; return false;
} }
else : else :
_deprecated_function( 'wp_get_cookie_login', '2.5' ); _deprecated_function( 'wp_get_cookie_login', '2.5.0' );
endif; endif;
if ( !function_exists('wp_login') ) : if ( !function_exists('wp_login') ) :
@ -169,7 +169,7 @@ if ( !function_exists('wp_login') ) :
* @return bool False on login failure, true on successful check * @return bool False on login failure, true on successful check
*/ */
function wp_login($username, $password, $deprecated = '') { function wp_login($username, $password, $deprecated = '') {
_deprecated_function( __FUNCTION__, '2.5', 'wp_signon()' ); _deprecated_function( __FUNCTION__, '2.5.0', 'wp_signon()' );
global $error; global $error;
$user = wp_authenticate($username, $password); $user = wp_authenticate($username, $password);
@ -181,7 +181,7 @@ function wp_login($username, $password, $deprecated = '') {
return false; return false;
} }
else : else :
_deprecated_function( 'wp_login', '2.5', 'wp_signon()' ); _deprecated_function( 'wp_login', '2.5.0', 'wp_signon()' );
endif; endif;
/** /**
@ -198,11 +198,11 @@ endif;
if ( ! class_exists( 'wp_atom_server', false ) ) { if ( ! class_exists( 'wp_atom_server', false ) ) {
class wp_atom_server { class wp_atom_server {
public function __call( $name, $arguments ) { 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 ) { 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' ) { function check_admin_referer( $action = -1, $query_arg = '_wpnonce' ) {
if ( -1 == $action ) 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()); $adminurl = strtolower(admin_url());
$referer = strtolower(wp_get_referer()); $referer = strtolower(wp_get_referer());
@ -1348,7 +1348,7 @@ if ( ! function_exists('wp_notify_postauthor') ) :
*/ */
function wp_notify_postauthor( $comment_id, $deprecated = null ) { function wp_notify_postauthor( $comment_id, $deprecated = null ) {
if ( null !== $deprecated ) { if ( null !== $deprecated ) {
_deprecated_argument( __FUNCTION__, '3.8' ); _deprecated_argument( __FUNCTION__, '3.8.0' );
} }
$comment = get_comment( $comment_id ); $comment = get_comment( $comment_id );

View File

@ -885,7 +885,7 @@ function register_deactivation_hook($file, $function) {
*/ */
function register_uninstall_hook( $file, $callback ) { function register_uninstall_hook( $file, $callback ) {
if ( is_array( $callback ) && is_object( $callback[0] ) ) { 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; return;
} }

View File

@ -373,7 +373,7 @@ function the_excerpt() {
*/ */
function get_the_excerpt( $post = null ) { function get_the_excerpt( $post = null ) {
if ( is_bool( $post ) ) { if ( is_bool( $post ) ) {
_deprecated_argument( __FUNCTION__, '2.3' ); _deprecated_argument( __FUNCTION__, '2.3.0' );
} }
$post = get_post( $post ); $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 ) { function the_attachment_link( $id = 0, $fullsize = false, $deprecated = false, $permalink = false ) {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.5' ); _deprecated_argument( __FUNCTION__, '2.5.0' );
if ( $fullsize ) if ( $fullsize )
echo wp_get_attachment_link($id, 'full', $permalink); 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 // $args array with (parent, format, right, left, type) deprecated since 3.6
if ( is_array( $type ) ) { if ( is_array( $type ) ) {
$type = ! empty( $type['type'] ) ? $type['type'] : $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 ) ) 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 ); $post_type = sanitize_key( $post_type );
if ( empty( $post_type ) || strlen( $post_type ) > 20 ) { 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.' ) ); 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 ) { function wp_get_recent_posts( $args = array(), $output = ARRAY_A ) {
if ( is_numeric( $args ) ) { 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 ) ); $args = array( 'numberposts' => absint( $args ) );
} }

View File

@ -151,7 +151,7 @@ function is_archive() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -172,7 +172,7 @@ function is_post_type_archive( $post_types = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -193,7 +193,7 @@ function is_attachment( $attachment = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -217,7 +217,7 @@ function is_author( $author = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -241,7 +241,7 @@ function is_category( $category = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -265,7 +265,7 @@ function is_tag( $tag = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -294,7 +294,7 @@ function is_tax( $taxonomy = '', $term = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -314,7 +314,7 @@ function is_date() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -334,7 +334,7 @@ function is_day() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -355,7 +355,7 @@ function is_feed( $feeds = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -375,7 +375,7 @@ function is_comment_feed() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -404,7 +404,7 @@ function is_front_page() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -433,7 +433,7 @@ function is_home() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -453,7 +453,7 @@ function is_month() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -480,7 +480,7 @@ function is_page( $page = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -500,7 +500,7 @@ function is_paged() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -520,7 +520,7 @@ function is_preview() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -540,7 +540,7 @@ function is_robots() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -560,7 +560,7 @@ function is_search() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -589,7 +589,7 @@ function is_single( $post = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -616,7 +616,7 @@ function is_singular( $post_types = '' ) {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -636,7 +636,7 @@ function is_time() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -656,7 +656,7 @@ function is_trackback() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -676,7 +676,7 @@ function is_year() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -696,7 +696,7 @@ function is_404() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -716,7 +716,7 @@ function is_embed() {
global $wp_query; global $wp_query;
if ( ! isset( $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; return false;
} }
@ -742,7 +742,7 @@ function is_main_query() {
'<code>is_main_query()</code>', '<code>is_main_query()</code>',
__( 'https://codex.wordpress.org/Function_Reference/is_main_query' ) __( '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; global $wp_query;
@ -2533,7 +2533,7 @@ class WP_Query {
$page = 1; $page = 1;
if ( isset( $q['caller_get_posts'] ) ) { 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'] ) ) if ( !isset( $q['ignore_sticky_posts'] ) )
$q['ignore_sticky_posts'] = $q['caller_get_posts']; $q['ignore_sticky_posts'] = $q['caller_get_posts'];
} }
@ -4424,7 +4424,7 @@ class WP_Query {
* @return bool * @return bool
*/ */
public function is_comments_popup() { public function is_comments_popup() {
_deprecated_function( __FUNCTION__, '4.5' ); _deprecated_function( __FUNCTION__, '4.5.0' );
return false; return false;
} }

View File

@ -4,4 +4,4 @@
* *
* @package WordPress * @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 * @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 * @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' ); require_once( ABSPATH . WPINC . '/rss.php' );

View File

@ -16,7 +16,7 @@
/** /**
* Deprecated. Use SimplePie (class-simplepie.php) instead. * 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. * 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 ); $args = array_merge( $defaults, $args );
if ( empty( $taxonomy ) || strlen( $taxonomy ) > 32 ) { 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.' ) ); 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 * @package WordPress
* @subpackage Theme_Compat * @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 * This file is here for backward compatibility with old themes and will be removed in a future version
* *
@ -10,7 +10,7 @@
_deprecated_file( _deprecated_file(
/* translators: %s: template name */ /* translators: %s: template name */
sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ), sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
'3.0', '3.0.0',
null, null,
/* translators: %s: template name */ /* translators: %s: template name */
sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) ) sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) )

View File

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

View File

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

View File

@ -2,14 +2,14 @@
/** /**
* @package WordPress * @package WordPress
* @subpackage Theme_Compat * @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. * This file is here for backward compatibility with old themes and will be removed in a future version.
*/ */
_deprecated_file( _deprecated_file(
/* translators: %s: template name */ /* translators: %s: template name */
sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ), sprintf( __( 'Theme without %s' ), basename( __FILE__ ) ),
'3.0', '3.0.0',
null, null,
/* translators: %s: template name */ /* translators: %s: template name */
sprintf( __( 'Please include a %s template in your theme.' ), basename( __FILE__ ) ) 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' ) ) { if ( did_action( 'wp_loaded' ) ) {
/* translators: 1: Theme support 2: hook name */ /* 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.' ), _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; return false;
} }

View File

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

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. * @deprecated 4.4.0 Fragment caching was removed in favor of split queries.
*/ */
public function flush_widget_cache() { 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 ) { function _weak_escape( $string ) {
if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) 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 ); return addslashes( $string );
} }
@ -1209,7 +1209,7 @@ class wpdb {
*/ */
public function escape( $data ) { public function escape( $data ) {
if ( func_num_args() === 1 && function_exists( '_deprecated_function' ) ) 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 ) ) { if ( is_array( $data ) ) {
foreach ( $data as $k => $v ) { foreach ( $data as $k => $v ) {
if ( is_array( $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. // This is not meant to be foolproof -- but it will catch obviously incorrect usage.
if ( strpos( $query, '%' ) === false ) { 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(); $args = func_get_args();
@ -3210,7 +3210,7 @@ class wpdb {
* @return bool True if collation is supported, false if version does not * @return bool True if collation is supported, false if version does not
*/ */
public function supports_collation() { 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' ); return $this->has_cap( 'collation' );
} }

View File

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