IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
|
| 23 | 23 | * @return mixed |
| 24 | 24 | */ |
| 25 | 25 | function get_query_var( $var, $default = '' ) { |
| | 26 | /** |
| | 27 | * @var WP_Query $wp_query |
| | 28 | */ |
| 26 | 29 | global $wp_query; |
| 27 | 30 | |
| 28 | 31 | return $wp_query->get( $var, $default ); |
| … |
… |
|
| 39 | 42 | * @return object |
| 40 | 43 | */ |
| 41 | 44 | function get_queried_object() { |
| | 45 | /** |
| | 46 | * @var WP_Query $wp_query |
| | 47 | */ |
| 42 | 48 | global $wp_query; |
| 43 | 49 | return $wp_query->get_queried_object(); |
| 44 | 50 | } |
| … |
… |
|
| 54 | 60 | * @return int |
| 55 | 61 | */ |
| 56 | 62 | function get_queried_object_id() { |
| | 63 | /** |
| | 64 | * @var WP_Query $wp_query |
| | 65 | */ |
| 57 | 66 | global $wp_query; |
| 58 | 67 | return $wp_query->get_queried_object_id(); |
| 59 | 68 | } |
| … |
… |
|
| 67 | 76 | * |
| 68 | 77 | * @param string $var Query variable key. |
| 69 | 78 | * @param mixed $value |
| 70 | | * @return null |
| 71 | 79 | */ |
| 72 | 80 | function set_query_var($var, $value) { |
| | 81 | /** |
| | 82 | * @var WP_Query $wp_query |
| | 83 | */ |
| 73 | 84 | global $wp_query; |
| 74 | 85 | |
| 75 | | return $wp_query->set($var, $value); |
| | 86 | $wp_query->set($var, $value); |
| 76 | 87 | } |
| 77 | 88 | |
| 78 | 89 | /** |
| … |
… |
|
| 115 | 126 | * @uses $wp_query |
| 116 | 127 | */ |
| 117 | 128 | function wp_reset_postdata() { |
| | 129 | /** |
| | 130 | * @var WP_Query $wp_query |
| | 131 | */ |
| 118 | 132 | global $wp_query; |
| 119 | 133 | |
| 120 | 134 | if ( isset( $wp_query ) ) { |
| … |
… |
|
| 138 | 152 | * @return bool |
| 139 | 153 | */ |
| 140 | 154 | function is_archive() { |
| | 155 | /** |
| | 156 | * @var WP_Query $wp_query |
| | 157 | */ |
| 141 | 158 | global $wp_query; |
| 142 | 159 | |
| 143 | 160 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 159 | 176 | * @return bool |
| 160 | 177 | */ |
| 161 | 178 | function is_post_type_archive( $post_types = '' ) { |
| | 179 | /** |
| | 180 | * @var WP_Query $wp_query |
| | 181 | */ |
| 162 | 182 | global $wp_query; |
| 163 | 183 | |
| 164 | 184 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 180 | 200 | * @return bool |
| 181 | 201 | */ |
| 182 | 202 | function is_attachment( $attachment = '' ) { |
| | 203 | /** |
| | 204 | * @var WP_Query $wp_query |
| | 205 | */ |
| 183 | 206 | global $wp_query; |
| 184 | 207 | |
| 185 | 208 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 204 | 227 | * @return bool |
| 205 | 228 | */ |
| 206 | 229 | function is_author( $author = '' ) { |
| | 230 | /** |
| | 231 | * @var WP_Query $wp_query |
| | 232 | */ |
| 207 | 233 | global $wp_query; |
| 208 | 234 | |
| 209 | 235 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 228 | 254 | * @return bool |
| 229 | 255 | */ |
| 230 | 256 | function is_category( $category = '' ) { |
| | 257 | /** |
| | 258 | * @var WP_Query $wp_query |
| | 259 | */ |
| 231 | 260 | global $wp_query; |
| 232 | 261 | |
| 233 | 262 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 252 | 281 | * @return bool |
| 253 | 282 | */ |
| 254 | 283 | function is_tag( $tag = '' ) { |
| | 284 | /** |
| | 285 | * @var WP_Query $wp_query |
| | 286 | */ |
| 255 | 287 | global $wp_query; |
| 256 | 288 | |
| 257 | 289 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 281 | 313 | * @return bool |
| 282 | 314 | */ |
| 283 | 315 | function is_tax( $taxonomy = '', $term = '' ) { |
| | 316 | /** |
| | 317 | * @var WP_Query $wp_query |
| | 318 | */ |
| 284 | 319 | global $wp_query; |
| 285 | 320 | |
| 286 | 321 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 301 | 336 | * @return bool |
| 302 | 337 | */ |
| 303 | 338 | function is_comments_popup() { |
| | 339 | /** |
| | 340 | * @var WP_Query $wp_query |
| | 341 | */ |
| 304 | 342 | global $wp_query; |
| 305 | 343 | |
| 306 | 344 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 321 | 359 | * @return bool |
| 322 | 360 | */ |
| 323 | 361 | function is_date() { |
| | 362 | /** |
| | 363 | * @var WP_Query $wp_query |
| | 364 | */ |
| 324 | 365 | global $wp_query; |
| 325 | 366 | |
| 326 | 367 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 341 | 382 | * @return bool |
| 342 | 383 | */ |
| 343 | 384 | function is_day() { |
| | 385 | /** |
| | 386 | * @var WP_Query $wp_query |
| | 387 | */ |
| 344 | 388 | global $wp_query; |
| 345 | 389 | |
| 346 | 390 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 362 | 406 | * @return bool |
| 363 | 407 | */ |
| 364 | 408 | function is_feed( $feeds = '' ) { |
| | 409 | /** |
| | 410 | * @var WP_Query $wp_query |
| | 411 | */ |
| 365 | 412 | global $wp_query; |
| 366 | 413 | |
| 367 | 414 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 382 | 429 | * @return bool |
| 383 | 430 | */ |
| 384 | 431 | function is_comment_feed() { |
| | 432 | /** |
| | 433 | * @var WP_Query $wp_query |
| | 434 | */ |
| 385 | 435 | global $wp_query; |
| 386 | 436 | |
| 387 | 437 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 410 | 460 | * @return bool True, if front of site. |
| 411 | 461 | */ |
| 412 | 462 | function is_front_page() { |
| | 463 | /** |
| | 464 | * @var WP_Query $wp_query |
| | 465 | */ |
| 413 | 466 | global $wp_query; |
| 414 | 467 | |
| 415 | 468 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 439 | 492 | * @return bool True if blog view homepage. |
| 440 | 493 | */ |
| 441 | 494 | function is_home() { |
| | 495 | /** |
| | 496 | * @var WP_Query $wp_query |
| | 497 | */ |
| 442 | 498 | global $wp_query; |
| 443 | 499 | |
| 444 | 500 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 459 | 515 | * @return bool |
| 460 | 516 | */ |
| 461 | 517 | function is_month() { |
| | 518 | /** |
| | 519 | * @var WP_Query $wp_query |
| | 520 | */ |
| 462 | 521 | global $wp_query; |
| 463 | 522 | |
| 464 | 523 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 486 | 545 | * @return bool |
| 487 | 546 | */ |
| 488 | 547 | function is_page( $page = '' ) { |
| | 548 | /** |
| | 549 | * @var WP_Query $wp_query |
| | 550 | */ |
| 489 | 551 | global $wp_query; |
| 490 | 552 | |
| 491 | 553 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 506 | 568 | * @return bool |
| 507 | 569 | */ |
| 508 | 570 | function is_paged() { |
| | 571 | /** |
| | 572 | * @var WP_Query $wp_query |
| | 573 | */ |
| 509 | 574 | global $wp_query; |
| 510 | 575 | |
| 511 | 576 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 526 | 591 | * @return bool |
| 527 | 592 | */ |
| 528 | 593 | function is_preview() { |
| | 594 | /** |
| | 595 | * @var WP_Query $wp_query |
| | 596 | */ |
| 529 | 597 | global $wp_query; |
| 530 | 598 | |
| 531 | 599 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 546 | 614 | * @return bool |
| 547 | 615 | */ |
| 548 | 616 | function is_robots() { |
| | 617 | /** |
| | 618 | * @var WP_Query $wp_query |
| | 619 | */ |
| 549 | 620 | global $wp_query; |
| 550 | 621 | |
| 551 | 622 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 566 | 637 | * @return bool |
| 567 | 638 | */ |
| 568 | 639 | function is_search() { |
| | 640 | /** |
| | 641 | * @var WP_Query $wp_query |
| | 642 | */ |
| 569 | 643 | global $wp_query; |
| 570 | 644 | |
| 571 | 645 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 595 | 669 | * @return bool |
| 596 | 670 | */ |
| 597 | 671 | function is_single( $post = '' ) { |
| | 672 | /** |
| | 673 | * @var WP_Query $wp_query |
| | 674 | */ |
| 598 | 675 | global $wp_query; |
| 599 | 676 | |
| 600 | 677 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 622 | 699 | * @return bool |
| 623 | 700 | */ |
| 624 | 701 | function is_singular( $post_types = '' ) { |
| | 702 | /** |
| | 703 | * @var WP_Query $wp_query |
| | 704 | */ |
| 625 | 705 | global $wp_query; |
| 626 | 706 | |
| 627 | 707 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 642 | 722 | * @return bool |
| 643 | 723 | */ |
| 644 | 724 | function is_time() { |
| | 725 | /** |
| | 726 | * @var WP_Query $wp_query |
| | 727 | */ |
| 645 | 728 | global $wp_query; |
| 646 | 729 | |
| 647 | 730 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 662 | 745 | * @return bool |
| 663 | 746 | */ |
| 664 | 747 | function is_trackback() { |
| | 748 | /** |
| | 749 | * @var WP_Query $wp_query |
| | 750 | */ |
| 665 | 751 | global $wp_query; |
| 666 | 752 | |
| 667 | 753 | if ( ! isset( $wp_query ) ) { |
| … |
… |
|
| 726 | 812 | _doing_it_wrong( __FUNCTION__, $message, '3.7' ); |
| 727 | 813 | } |
| 728 | 814 | |
| | 815 | /** |
| | 816 | * @var WP_Query $wp_query |
| | 817 | */ |
| 729 | 818 | global $wp_query; |
| 730 | 819 | return $wp_query->is_main_query(); |
| 731 | 820 | } |
| … |
… |
|
| 744 | 833 | * @return bool |
| 745 | 834 | */ |
| 746 | 835 | function have_posts() { |
| | 836 | /** |
| | 837 | * @var WP_Query $wp_query |
| | 838 | */ |
| 747 | 839 | global $wp_query; |
| 748 | 840 | |
| 749 | 841 | return $wp_query->have_posts(); |
| … |
… |
|
| 758 | 850 | * @return bool True if caller is within loop, false if loop hasn't started or ended. |
| 759 | 851 | */ |
| 760 | 852 | function in_the_loop() { |
| | 853 | /** |
| | 854 | * @var WP_Query $wp_query |
| | 855 | */ |
| 761 | 856 | global $wp_query; |
| 762 | 857 | |
| 763 | 858 | return $wp_query->in_the_loop; |
| … |
… |
|
| 769 | 864 | * @see WP_Query::rewind_posts() |
| 770 | 865 | * @since 1.5.0 |
| 771 | 866 | * @uses $wp_query |
| 772 | | * |
| 773 | | * @return null |
| 774 | 867 | */ |
| 775 | 868 | function rewind_posts() { |
| | 869 | /** |
| | 870 | * @var WP_Query $wp_query |
| | 871 | */ |
| 776 | 872 | global $wp_query; |
| 777 | 873 | |
| 778 | | return $wp_query->rewind_posts(); |
| | 874 | $wp_query->rewind_posts(); |
| 779 | 875 | } |
| 780 | 876 | |
| 781 | 877 | /** |
| … |
… |
|
| 786 | 882 | * @uses $wp_query |
| 787 | 883 | */ |
| 788 | 884 | function the_post() { |
| | 885 | /** |
| | 886 | * @var WP_Query $wp_query |
| | 887 | */ |
| 789 | 888 | global $wp_query; |
| 790 | 889 | |
| 791 | 890 | $wp_query->the_post(); |
| … |
… |
|
| 805 | 904 | * @return bool |
| 806 | 905 | */ |
| 807 | 906 | function have_comments() { |
| | 907 | /** |
| | 908 | * @var WP_Query $wp_query |
| | 909 | */ |
| 808 | 910 | global $wp_query; |
| 809 | 911 | return $wp_query->have_comments(); |
| 810 | 912 | } |
| … |
… |
|
| 815 | 917 | * @see WP_Query::the_comment() |
| 816 | 918 | * @since 2.2.0 |
| 817 | 919 | * @uses $wp_query |
| 818 | | * |
| 819 | | * @return object |
| 820 | 920 | */ |
| 821 | 921 | function the_comment() { |
| | 922 | /** |
| | 923 | * @var WP_Query $wp_query |
| | 924 | */ |
| 822 | 925 | global $wp_query; |
| 823 | | return $wp_query->the_comment(); |
| | 926 | $wp_query->the_comment(); |
| 824 | 927 | } |
| 825 | 928 | |
| 826 | 929 | /* |
| … |
… |
|
| 3969 | 4072 | * @access public |
| 3970 | 4073 | * |
| 3971 | 4074 | * @param string|array $query URL query string or array of vars. |
| | 4075 | * @return WP_Query |
| 3972 | 4076 | */ |
| 3973 | 4077 | public function __construct($query = '') { |
| 3974 | 4078 | if ( ! empty($query) ) { |
| … |
… |
|
| 4658 | 4762 | * @return null If no link is found, null is returned. |
| 4659 | 4763 | */ |
| 4660 | 4764 | function wp_old_slug_redirect() { |
| | 4765 | /** |
| | 4766 | * @var WP_Query $wp_query |
| | 4767 | */ |
| 4661 | 4768 | global $wp_query; |
| 4662 | 4769 | if ( is_404() && '' != $wp_query->query_vars['name'] ) : |
| 4663 | 4770 | global $wpdb; |
| … |
… |
|
| 4715 | 4822 | * @return bool True when finished. |
| 4716 | 4823 | */ |
| 4717 | 4824 | function setup_postdata( $post ) { |
| | 4825 | /** |
| | 4826 | * @var WP_Query $wp_query |
| | 4827 | */ |
| 4718 | 4828 | global $wp_query; |
| 4719 | 4829 | |
| 4720 | 4830 | if ( ! empty( $wp_query ) && $wp_query instanceof WP_Query ) { |