Make WordPress Core


Ignore:
Timestamp:
07/06/2016 12:39:01 PM (10 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/deprecated.php

    r37619 r37985  
    1919 */
    2020function tinymce_include() {
    21         _deprecated_function( __FUNCTION__, '2.1', 'wp_editor()' );
     21        _deprecated_function( __FUNCTION__, '2.1.0', 'wp_editor()' );
    2222
    2323        wp_tiny_mce();
    … …  
    3232 */
    3333function documentation_link() {
    34         _deprecated_function( __FUNCTION__, '2.5' );
     34        _deprecated_function( __FUNCTION__, '2.5.0' );
    3535}
    3636
    … …  
    4949 */
    5050function wp_shrink_dimensions( $width, $height, $wmax = 128, $hmax = 96 ) {
    51         _deprecated_function( __FUNCTION__, '3.0', 'wp_constrain_dimensions()' );
     51        _deprecated_function( __FUNCTION__, '3.0.0', 'wp_constrain_dimensions()' );
    5252        return wp_constrain_dimensions( $width, $height, $wmax, $hmax );
    5353}
    … …  
    6565 */
    6666function get_udims( $width, $height ) {
    67         _deprecated_function( __FUNCTION__, '3.5', 'wp_constrain_dimensions()' );
     67        _deprecated_function( __FUNCTION__, '3.5.0', 'wp_constrain_dimensions()' );
    6868        return wp_constrain_dimensions( $width, $height, 128, 96 );
    6969}
    … …  
    8181 */
    8282function dropdown_categories( $default = 0, $parent = 0, $popular_ids = array() ) {
    83         _deprecated_function( __FUNCTION__, '2.6', 'wp_category_checklist()' );
     83        _deprecated_function( __FUNCTION__, '2.6.0', 'wp_category_checklist()' );
    8484        global $post_ID;
    8585        wp_category_checklist( $post_ID );
    … …  
    9696 */
    9797function dropdown_link_categories( $default = 0 ) {
    98         _deprecated_function( __FUNCTION__, '2.6', 'wp_link_category_checklist()' );
     98        _deprecated_function( __FUNCTION__, '2.6.0', 'wp_link_category_checklist()' );
    9999        global $link_id;
    100100        wp_link_category_checklist( $link_id );
    … …  
    112112 */
    113113function get_real_file_to_edit( $file ) {
    114         _deprecated_function( __FUNCTION__, '2.9' );
     114        _deprecated_function( __FUNCTION__, '2.9.0' );
    115115
    116116        return WP_CONTENT_DIR . $file;
    … …  
    132132 */
    133133function wp_dropdown_cats( $currentcat = 0, $currentparent = 0, $parent = 0, $level = 0, $categories = 0 ) {
    134         _deprecated_function( __FUNCTION__, '3.0', 'wp_dropdown_categories()' );
     134        _deprecated_function( __FUNCTION__, '3.0.0', 'wp_dropdown_categories()' );
    135135        if (!$categories )
    136136                $categories = get_categories( array('hide_empty' => 0) );
    … …  
    166166 */
    167167function add_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
    168         _deprecated_function( __FUNCTION__, '3.0', 'register_setting()' );
     168        _deprecated_function( __FUNCTION__, '3.0.0', 'register_setting()' );
    169169        register_setting( $option_group, $option_name, $sanitize_callback );
    170170}
    … …  
    182182 */
    183183function remove_option_update_handler( $option_group, $option_name, $sanitize_callback = '' ) {
    184         _deprecated_function( __FUNCTION__, '3.0', 'unregister_setting()' );
     184        _deprecated_function( __FUNCTION__, '3.0.0', 'unregister_setting()' );
    185185        unregister_setting( $option_group, $option_name, $sanitize_callback );
    186186}
    … …  
    195195**/
    196196function codepress_get_lang( $filename ) {
    197         _deprecated_function( __FUNCTION__, '3.0' );
     197        _deprecated_function( __FUNCTION__, '3.0.0' );
    198198}
    199199
    … …  
    205205**/
    206206function codepress_footer_js() {
    207         _deprecated_function( __FUNCTION__, '3.0' );
     207        _deprecated_function( __FUNCTION__, '3.0.0' );
    208208}
    209209
    … …  
    215215**/
    216216function use_codepress() {
    217         _deprecated_function( __FUNCTION__, '3.0' );
     217        _deprecated_function( __FUNCTION__, '3.0.0' );
    218218}
    219219
    … …  
    226226 */
    227227function get_author_user_ids() {
    228         _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
     228        _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
    229229
    230230        global $wpdb;
    … …  
    246246 */
    247247function get_editable_authors( $user_id ) {
    248         _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
     248        _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
    249249
    250250        global $wpdb;
    … …  
    272272 */
    273273function get_editable_user_ids( $user_id, $exclude_zeros = true, $post_type = 'post' ) {
    274         _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
     274        _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
    275275
    276276        global $wpdb;
    … …  
    305305 */
    306306function get_nonauthor_user_ids() {
    307         _deprecated_function( __FUNCTION__, '3.1', 'get_users()' );
     307        _deprecated_function( __FUNCTION__, '3.1.0', 'get_users()' );
    308308
    309309        global $wpdb;
    … …  
    481481         */
    482482        function __construct( $search_term = '', $page = '', $role = '' ) {
    483                 _deprecated_function( __FUNCTION__, '3.1', 'WP_User_Query' );
     483                _deprecated_function( __FUNCTION__, '3.1.0', 'WP_User_Query' );
    484484
    485485                $this->search_term = wp_unslash( $search_term );
    … …  
    671671 */
    672672function get_others_unpublished_posts( $user_id, $type = 'any' ) {
    673         _deprecated_function( __FUNCTION__, '3.1' );
     673        _deprecated_function( __FUNCTION__, '3.1.0' );
    674674
    675675        global $wpdb;
    … …  
    704704 */
    705705function get_others_drafts($user_id) {
    706         _deprecated_function( __FUNCTION__, '3.1' );
     706        _deprecated_function( __FUNCTION__, '3.1.0' );
    707707
    708708        return get_others_unpublished_posts($user_id, 'draft');
    … …  
    719719 */
    720720function get_others_pending($user_id) {
    721         _deprecated_function( __FUNCTION__, '3.1' );
     721        _deprecated_function( __FUNCTION__, '3.1.0' );
    722722
    723723        return get_others_unpublished_posts($user_id, 'pending');
    … …  
    732732 */
    733733function wp_dashboard_quick_press_output() {
    734         _deprecated_function( __FUNCTION__, '3.2', 'wp_dashboard_quick_press()' );
     734        _deprecated_function( __FUNCTION__, '3.2.0', 'wp_dashboard_quick_press()' );
    735735        wp_dashboard_quick_press();
    736736}
    … …  
    746746 */
    747747function wp_tiny_mce( $teeny = false, $settings = false ) {
    748         _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
     748        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
    749749
    750750        static $num = 1;
    … …  
    772772 */
    773773function wp_preload_dialogs() {
    774         _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
     774        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
    775775}
    776776
    … …  
    782782 */
    783783function wp_print_editor_js() {
    784         _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
     784        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
    785785}
    786786
    … …  
    792792 */
    793793function wp_quicktags() {
    794         _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
     794        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_editor()' );
    795795}
    796796
    … …  
    803803 */
    804804function screen_layout( $screen ) {
    805         _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_screen_layout()' );
     805        _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_screen_layout()' );
    806806
    807807        $current_screen = get_current_screen();
    … …  
    823823 */
    824824function screen_options( $screen ) {
    825         _deprecated_function( __FUNCTION__, '3.3', '$current_screen->render_per_page_options()' );
     825        _deprecated_function( __FUNCTION__, '3.3.0', '$current_screen->render_per_page_options()' );
    826826
    827827        $current_screen = get_current_screen();
    … …  
    855855 */
    856856function favorite_actions() {
    857         _deprecated_function( __FUNCTION__, '3.2', 'WP_Admin_Bar' );
     857        _deprecated_function( __FUNCTION__, '3.2.0', 'WP_Admin_Bar' );
    858858}
    859859
    … …  
    867867 */
    868868function media_upload_image() {
    869         _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
     869        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
    870870        return wp_media_upload_handler();
    871871}
    … …  
    880880 */
    881881function media_upload_audio() {
    882         _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
     882        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
    883883        return wp_media_upload_handler();
    884884}
    … …  
    893893 */
    894894function media_upload_video() {
    895         _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
     895        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
    896896        return wp_media_upload_handler();
    897897}
    … …  
    906906 */
    907907function media_upload_file() {
    908         _deprecated_function( __FUNCTION__, '3.3', 'wp_media_upload_handler()' );
     908        _deprecated_function( __FUNCTION__, '3.3.0', 'wp_media_upload_handler()' );
    909909        return wp_media_upload_handler();
    910910}
    … …  
    919919 */
    920920function type_url_form_image() {
    921         _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('image')" );
     921        _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('image')" );
    922922        return wp_media_insert_url_form( 'image' );
    923923}
    … …  
    932932 */
    933933function type_url_form_audio() {
    934         _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('audio')" );
     934        _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('audio')" );
    935935        return wp_media_insert_url_form( 'audio' );
    936936}
    … …  
    945945 */
    946946function type_url_form_video() {
    947         _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('video')" );
     947        _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('video')" );
    948948        return wp_media_insert_url_form( 'video' );
    949949}
    … …  
    958958 */
    959959function type_url_form_file() {
    960         _deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
     960        _deprecated_function( __FUNCTION__, '3.3.0', "wp_media_insert_url_form('file')" );
    961961        return wp_media_insert_url_form( 'file' );
    962962}
    … …  
    975975 */
    976976function add_contextual_help( $screen, $help ) {
    977         _deprecated_function( __FUNCTION__, '3.3', 'get_current_screen()->add_help_tab()' );
     977        _deprecated_function( __FUNCTION__, '3.3.0', 'get_current_screen()->add_help_tab()' );
    978978
    979979        if ( is_string( $screen ) )
    … …  
    993993 */
    994994function get_allowed_themes() {
    995         _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'allowed' => true ) )" );
     995        _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'allowed' => true ) )" );
    996996
    997997        $themes = wp_get_themes( array( 'allowed' => true ) );
    … …  
    10151015 */
    10161016function get_broken_themes() {
    1017         _deprecated_function( __FUNCTION__, '3.4', "wp_get_themes( array( 'errors' => true )" );
     1017        _deprecated_function( __FUNCTION__, '3.4.0', "wp_get_themes( array( 'errors' => true )" );
    10181018
    10191019        $themes = wp_get_themes( array( 'errors' => true ) );
    … …  
    10401040 */
    10411041function current_theme_info() {
    1042         _deprecated_function( __FUNCTION__, '3.4', 'wp_get_theme()' );
     1042        _deprecated_function( __FUNCTION__, '3.4.0', 'wp_get_theme()' );
    10431043
    10441044        return wp_get_theme();
    … …  
    10531053 */
    10541054function _insert_into_post_button( $type ) {
    1055         _deprecated_function( __FUNCTION__, '3.5' );
     1055        _deprecated_function( __FUNCTION__, '3.5.0' );
    10561056}
    10571057
    … …  
    10641064 */
    10651065function _media_button($title, $icon, $type, $id) {
    1066         _deprecated_function( __FUNCTION__, '3.5' );
     1066        _deprecated_function( __FUNCTION__, '3.5.0' );
    10671067}
    10681068
    … …  
    10781078 */
    10791079function get_post_to_edit( $id ) {
    1080         _deprecated_function( __FUNCTION__, '3.5', 'get_post()' );
     1080        _deprecated_function( __FUNCTION__, '3.5.0', 'get_post()' );
    10811081
    10821082        return get_post( $id, OBJECT, 'edit' );
    … …  
    10931093 */
    10941094function get_default_page_to_edit() {
    1095         _deprecated_function( __FUNCTION__, '3.5', "get_default_post_to_edit( 'page' )" );
     1095        _deprecated_function( __FUNCTION__, '3.5.0', "get_default_post_to_edit( 'page' )" );
    10961096
    10971097        $page = get_default_post_to_edit();
    … …  
    11131113 */
    11141114function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) {
    1115         _deprecated_function( __FUNCTION__, '3.5', 'image_resize()' );
     1115        _deprecated_function( __FUNCTION__, '3.5.0', 'image_resize()' );
    11161116        return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) );
    11171117}
    … …  
    11261126 */
    11271127function wp_nav_menu_locations_meta_box() {
    1128         _deprecated_function( __FUNCTION__, '3.6' );
     1128        _deprecated_function( __FUNCTION__, '3.6.0' );
    11291129}
    11301130
    … …  
    11401140 */
    11411141function wp_update_core($current, $feedback = '') {
    1142         _deprecated_function( __FUNCTION__, '3.7', 'new Core_Upgrader();' );
     1142        _deprecated_function( __FUNCTION__, '3.7.0', 'new Core_Upgrader();' );
    11431143
    11441144        if ( !empty($feedback) )
    … …  
    11631163 */
    11641164function wp_update_plugin($plugin, $feedback = '') {
    1165         _deprecated_function( __FUNCTION__, '3.7', 'new Plugin_Upgrader();' );
     1165        _deprecated_function( __FUNCTION__, '3.7.0', 'new Plugin_Upgrader();' );
    11661166
    11671167        if ( !empty($feedback) )
    … …  
    11851185 */
    11861186function wp_update_theme($theme, $feedback = '') {
    1187         _deprecated_function( __FUNCTION__, '3.7', 'new Theme_Upgrader();' );
     1187        _deprecated_function( __FUNCTION__, '3.7.0', 'new Theme_Upgrader();' );
    11881188
    11891189        if ( !empty($feedback) )
    … …  
    12041204 */
    12051205function the_attachment_links( $id = false ) {
    1206         _deprecated_function( __FUNCTION__, '3.7' );
     1206        _deprecated_function( __FUNCTION__, '3.7.0' );
    12071207}
    12081208
    … …  
    13061306 */
    13071307function _relocate_children( $old_ID, $new_ID ) {
    1308         _deprecated_function( __FUNCTION__, '3.9' );
     1308        _deprecated_function( __FUNCTION__, '3.9.0' );
    13091309}
    13101310
    … …  
    13331333 */
    13341334function add_object_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
    1335         _deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' );
     1335        _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
    13361336
    13371337        global $_wp_last_object_menu;
    … …  
    13661366 */
    13671367function add_utility_page( $page_title, $menu_title, $capability, $menu_slug, $function = '', $icon_url = '') {
    1368         _deprecated_function( __FUNCTION__, '4.5', 'add_menu_page()' );
     1368        _deprecated_function( __FUNCTION__, '4.5.0', 'add_menu_page()' );
    13691369
    13701370        global $_wp_last_utility_menu;
    … …  
    13911391        global $is_safari, $is_chrome;
    13921392
    1393         _deprecated_function( __FUNCTION__, '4.6' );
     1393        _deprecated_function( __FUNCTION__, '4.6.0' );
    13941394
    13951395        if ( $is_safari || $is_chrome ) {
Note: See TracChangeset for help on using the changeset viewer.