Ticket #14729: 14729.diff
File 14729.diff, 7.0 KB (added by , 14 years ago) |
---|
-
wp-includes/query.php
144 144 145 145 if ( ! isset( $wp_query ) ) { 146 146 _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; 148 148 } 149 149 150 150 return $wp_query->is_archive(); … … 165 165 166 166 if ( ! isset( $wp_query ) ) { 167 167 _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; 169 169 } 170 170 171 171 return $wp_query->is_post_type_archive( $post_types ); … … 185 185 186 186 if ( ! isset( $wp_query ) ) { 187 187 _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; 189 189 } 190 190 191 191 return $wp_query->is_attachment(); … … 209 209 210 210 if ( ! isset( $wp_query ) ) { 211 211 _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; 213 213 } 214 214 215 215 return $wp_query->is_author( $author ); … … 233 233 234 234 if ( ! isset( $wp_query ) ) { 235 235 _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; 237 237 } 238 238 239 239 return $wp_query->is_category( $category ); … … 257 257 258 258 if ( ! isset( $wp_query ) ) { 259 259 _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; 261 261 } 262 262 263 263 return $wp_query->is_tag( $slug ); … … 286 286 287 287 if ( ! isset( $wp_query ) ) { 288 288 _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; 290 290 } 291 291 292 292 return $wp_query->is_tax( $taxonomy, $term ); … … 306 306 307 307 if ( ! isset( $wp_query ) ) { 308 308 _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; 310 310 } 311 311 312 312 return $wp_query->is_comments_popup(); … … 326 326 327 327 if ( ! isset( $wp_query ) ) { 328 328 _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; 330 330 } 331 331 332 332 return $wp_query->is_date(); … … 346 346 347 347 if ( ! isset( $wp_query ) ) { 348 348 _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; 350 350 } 351 351 352 352 return $wp_query->is_day(); … … 367 367 368 368 if ( ! isset( $wp_query ) ) { 369 369 _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; 371 371 } 372 372 373 373 return $wp_query->is_feed( $feeds ); … … 387 387 388 388 if ( ! isset( $wp_query ) ) { 389 389 _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; 391 391 } 392 392 393 393 return $wp_query->is_comment_feed(); … … 417 417 418 418 if ( ! isset( $wp_query ) ) { 419 419 _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; 421 421 } 422 422 423 423 return $wp_query->is_front_page(); … … 446 446 447 447 if ( ! isset( $wp_query ) ) { 448 448 _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; 450 450 } 451 451 452 452 return $wp_query->is_home(); … … 466 466 467 467 if ( ! isset( $wp_query ) ) { 468 468 _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; 470 470 } 471 471 472 472 return $wp_query->is_month(); … … 493 493 494 494 if ( ! isset( $wp_query ) ) { 495 495 _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; 497 497 } 498 498 499 499 return $wp_query->is_page( $page ); … … 513 513 514 514 if ( ! isset( $wp_query ) ) { 515 515 _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; 517 517 } 518 518 519 519 return $wp_query->is_paged(); … … 533 533 534 534 if ( ! isset( $wp_query ) ) { 535 535 _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; 537 537 } 538 538 539 539 return $wp_query->is_preview(); … … 553 553 554 554 if ( ! isset( $wp_query ) ) { 555 555 _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; 557 557 } 558 558 559 559 return $wp_query->is_robots(); … … 573 573 574 574 if ( ! isset( $wp_query ) ) { 575 575 _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; 577 577 } 578 578 579 579 return $wp_query->is_search(); … … 602 602 603 603 if ( ! isset( $wp_query ) ) { 604 604 _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; 606 606 } 607 607 608 608 return $wp_query->is_single( $post ); … … 629 629 630 630 if ( ! isset( $wp_query ) ) { 631 631 _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; 633 633 } 634 634 635 635 return $wp_query->is_singular( $post_types ); … … 649 649 650 650 if ( ! isset( $wp_query ) ) { 651 651 _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; 653 653 } 654 654 655 655 return $wp_query->is_time(); … … 669 669 670 670 if ( ! isset( $wp_query ) ) { 671 671 _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; 673 673 } 674 674 675 675 return $wp_query->is_trackback(); … … 689 689 690 690 if ( ! isset( $wp_query ) ) { 691 691 _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; 693 693 } 694 694 695 695 return $wp_query->is_year(); … … 709 709 710 710 if ( ! isset( $wp_query ) ) { 711 711 _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; 713 713 } 714 714 715 715 return $wp_query->is_404();