WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/06/2016 12:39:01 PM (3 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-includes/query.php

    r37878 r37985  
    152152
    153153    if ( ! isset( $wp_query ) ) {
    154         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     154        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    155155        return false;
    156156    }
     
    173173
    174174    if ( ! isset( $wp_query ) ) {
    175         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     175        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    176176        return false;
    177177    }
     
    194194
    195195    if ( ! isset( $wp_query ) ) {
    196         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     196        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    197197        return false;
    198198    }
     
    218218
    219219    if ( ! isset( $wp_query ) ) {
    220         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     220        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    221221        return false;
    222222    }
     
    242242
    243243    if ( ! isset( $wp_query ) ) {
    244         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     244        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    245245        return false;
    246246    }
     
    266266
    267267    if ( ! isset( $wp_query ) ) {
    268         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     268        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    269269        return false;
    270270    }
     
    295295
    296296    if ( ! isset( $wp_query ) ) {
    297         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     297        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    298298        return false;
    299299    }
     
    315315
    316316    if ( ! isset( $wp_query ) ) {
    317         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     317        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    318318        return false;
    319319    }
     
    335335
    336336    if ( ! isset( $wp_query ) ) {
    337         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     337        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    338338        return false;
    339339    }
     
    356356
    357357    if ( ! isset( $wp_query ) ) {
    358         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     358        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    359359        return false;
    360360    }
     
    376376
    377377    if ( ! isset( $wp_query ) ) {
    378         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     378        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    379379        return false;
    380380    }
     
    405405
    406406    if ( ! isset( $wp_query ) ) {
    407         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     407        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    408408        return false;
    409409    }
     
    434434
    435435    if ( ! isset( $wp_query ) ) {
    436         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     436        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    437437        return false;
    438438    }
     
    454454
    455455    if ( ! isset( $wp_query ) ) {
    456         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     456        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    457457        return false;
    458458    }
     
    481481
    482482    if ( ! isset( $wp_query ) ) {
    483         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     483        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    484484        return false;
    485485    }
     
    501501
    502502    if ( ! isset( $wp_query ) ) {
    503         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     503        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    504504        return false;
    505505    }
     
    521521
    522522    if ( ! isset( $wp_query ) ) {
    523         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     523        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    524524        return false;
    525525    }
     
    541541
    542542    if ( ! isset( $wp_query ) ) {
    543         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     543        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    544544        return false;
    545545    }
     
    561561
    562562    if ( ! isset( $wp_query ) ) {
    563         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     563        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    564564        return false;
    565565    }
     
    590590
    591591    if ( ! isset( $wp_query ) ) {
    592         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     592        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    593593        return false;
    594594    }
     
    617617
    618618    if ( ! isset( $wp_query ) ) {
    619         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     619        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    620620        return false;
    621621    }
     
    637637
    638638    if ( ! isset( $wp_query ) ) {
    639         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     639        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    640640        return false;
    641641    }
     
    657657
    658658    if ( ! isset( $wp_query ) ) {
    659         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     659        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    660660        return false;
    661661    }
     
    677677
    678678    if ( ! isset( $wp_query ) ) {
    679         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     679        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    680680        return false;
    681681    }
     
    697697
    698698    if ( ! isset( $wp_query ) ) {
    699         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     699        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    700700        return false;
    701701    }
     
    717717
    718718    if ( ! isset( $wp_query ) ) {
    719         _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1' );
     719        _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' );
    720720        return false;
    721721    }
     
    743743            __( 'https://codex.wordpress.org/Function_Reference/is_main_query' )
    744744        );
    745         _doing_it_wrong( __FUNCTION__, $message, '3.7' );
     745        _doing_it_wrong( __FUNCTION__, $message, '3.7.0' );
    746746    }
    747747
     
    25342534
    25352535        if ( isset( $q['caller_get_posts'] ) ) {
    2536             _deprecated_argument( 'WP_Query', '3.1', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
     2536            _deprecated_argument( 'WP_Query', '3.1.0', __( '"caller_get_posts" is deprecated. Use "ignore_sticky_posts" instead.' ) );
    25372537            if ( !isset( $q['ignore_sticky_posts'] ) )
    25382538                $q['ignore_sticky_posts'] = $q['caller_get_posts'];
     
    44254425     */
    44264426    public function is_comments_popup() {
    4427         _deprecated_function( __FUNCTION__, '4.5' );
     4427        _deprecated_function( __FUNCTION__, '4.5.0' );
    44284428
    44294429        return false;
Note: See TracChangeset for help on using the changeset viewer.