Make WordPress Core

Ticket #14729: 14729.diff

File 14729.diff, 7.0 KB (added by nacin, 14 years ago)
  • wp-includes/query.php

     
    144144
    145145        if ( ! isset( $wp_query ) ) {
    146146                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    147                 // return false;
     147                return false;
    148148        }
    149149
    150150        return $wp_query->is_archive();
     
    165165
    166166        if ( ! isset( $wp_query ) ) {
    167167                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    168                 // return false;
     168                return false;
    169169        }
    170170
    171171        return $wp_query->is_post_type_archive( $post_types );
     
    185185
    186186        if ( ! isset( $wp_query ) ) {
    187187                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    188                 // return false;
     188                return false;
    189189        }
    190190
    191191        return $wp_query->is_attachment();
     
    209209
    210210        if ( ! isset( $wp_query ) ) {
    211211                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    212                 // return false;
     212                return false;
    213213        }
    214214
    215215        return $wp_query->is_author( $author );
     
    233233
    234234        if ( ! isset( $wp_query ) ) {
    235235                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    236                 // return false;
     236                return false;
    237237        }
    238238
    239239        return $wp_query->is_category( $category );
     
    257257
    258258        if ( ! isset( $wp_query ) ) {
    259259                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    260                 // return false;
     260                return false;
    261261        }
    262262
    263263        return $wp_query->is_tag( $slug );
     
    286286
    287287        if ( ! isset( $wp_query ) ) {
    288288                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    289                 // return false;
     289                return false;
    290290        }
    291291
    292292        return $wp_query->is_tax( $taxonomy, $term );
     
    306306
    307307        if ( ! isset( $wp_query ) ) {
    308308                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    309                 // return false;
     309                return false;
    310310        }
    311311
    312312        return $wp_query->is_comments_popup();
     
    326326
    327327        if ( ! isset( $wp_query ) ) {
    328328                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    329                 // return false;
     329                return false;
    330330        }
    331331
    332332        return $wp_query->is_date();
     
    346346
    347347        if ( ! isset( $wp_query ) ) {
    348348                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    349                 // return false;
     349                return false;
    350350        }
    351351
    352352        return $wp_query->is_day();
     
    367367
    368368        if ( ! isset( $wp_query ) ) {
    369369                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    370                 // return false;
     370                return false;
    371371        }
    372372
    373373        return $wp_query->is_feed( $feeds );
     
    387387
    388388        if ( ! isset( $wp_query ) ) {
    389389                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    390                 // return false;
     390                return false;
    391391        }
    392392
    393393        return $wp_query->is_comment_feed();
     
    417417
    418418        if ( ! isset( $wp_query ) ) {
    419419                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    420                 // return false;
     420                return false;
    421421        }
    422422
    423423        return $wp_query->is_front_page();
     
    446446
    447447        if ( ! isset( $wp_query ) ) {
    448448                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    449                 // return false;
     449                return false;
    450450        }
    451451
    452452        return $wp_query->is_home();
     
    466466
    467467        if ( ! isset( $wp_query ) ) {
    468468                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    469                 // return false;
     469                return false;
    470470        }
    471471
    472472        return $wp_query->is_month();
     
    493493
    494494        if ( ! isset( $wp_query ) ) {
    495495                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    496                 // return false;
     496                return false;
    497497        }
    498498
    499499        return $wp_query->is_page( $page );
     
    513513
    514514        if ( ! isset( $wp_query ) ) {
    515515                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    516                 // return false;
     516                return false;
    517517        }
    518518
    519519        return $wp_query->is_paged();
     
    533533
    534534        if ( ! isset( $wp_query ) ) {
    535535                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    536                 // return false;
     536                return false;
    537537        }
    538538
    539539        return $wp_query->is_preview();
     
    553553
    554554        if ( ! isset( $wp_query ) ) {
    555555                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    556                 // return false;
     556                return false;
    557557        }
    558558
    559559        return $wp_query->is_robots();
     
    573573
    574574        if ( ! isset( $wp_query ) ) {
    575575                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    576                 // return false;
     576                return false;
    577577        }
    578578
    579579        return $wp_query->is_search();
     
    602602
    603603        if ( ! isset( $wp_query ) ) {
    604604                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    605                 // return false;
     605                return false;
    606606        }
    607607
    608608        return $wp_query->is_single( $post );
     
    629629
    630630        if ( ! isset( $wp_query ) ) {
    631631                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    632                 // return false;
     632                return false;
    633633        }
    634634
    635635        return $wp_query->is_singular( $post_types );
     
    649649
    650650        if ( ! isset( $wp_query ) ) {
    651651                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    652                 // return false;
     652                return false;
    653653        }
    654654
    655655        return $wp_query->is_time();
     
    669669
    670670        if ( ! isset( $wp_query ) ) {
    671671                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    672                 // return false;
     672                return false;
    673673        }
    674674
    675675        return $wp_query->is_trackback();
     
    689689
    690690        if ( ! isset( $wp_query ) ) {
    691691                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    692                 // return false;
     692                return false;
    693693        }
    694694
    695695        return $wp_query->is_year();
     
    709709
    710710        if ( ! isset( $wp_query ) ) {
    711711                _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the init hook. They always return false.' ), '3.1' );
    712                 // return false;
     712                return false;
    713713        }
    714714
    715715        return $wp_query->is_404();