WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/04/2019 01:58:03 AM (2 years ago)
Author:
SergeyBiryukov
Message:

Docs: Add missing description for $wp_query and $wp_the_query globals.

Props mukesh27.
See #45604, #47110.

File:
1 edited

Legend:

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

    r45674 r45739  
    1818 * @since 3.9.0 The `$default` argument was introduced.
    1919 *
    20  * @global WP_Query $wp_query Global WP_Query instance.
     20 * @global WP_Query $wp_query WordPress Query object.
    2121 *
    2222 * @param string $var       The variable key to retrieve.
     
    3636 * @since 3.1.0
    3737 *
    38  * @global WP_Query $wp_query Global WP_Query instance.
     38 * @global WP_Query $wp_query WordPress Query object.
    3939 *
    4040 * @return object Queried object.
     
    5252 * @since 3.1.0
    5353 *
    54  * @global WP_Query $wp_query Global WP_Query instance.
     54 * @global WP_Query $wp_query WordPress Query object.
    5555 *
    5656 * @return int ID of the queried object.
     
    6666 * @since 2.2.0
    6767 *
    68  * @global WP_Query $wp_query Global WP_Query instance.
     68 * @global WP_Query $wp_query WordPress Query object.
    6969 *
    7070 * @param string $var   Query variable key.
     
    8989 * @since 1.5.0
    9090 *
    91  * @global WP_Query $wp_query Global WP_Query instance.
     91 * @global WP_Query $wp_query WordPress Query object.
    9292 *
    9393 * @param array|string $query Array or string of WP_Query arguments.
     
    108108 * @since 2.3.0
    109109 *
    110  * @global WP_Query $wp_query     Global WP_Query instance.
     110 * @global WP_Query $wp_query     WordPress Query object.
    111111 * @global WP_Query $wp_the_query Copy of the global WP_Query instance created during wp_reset_query().
    112112 */
     
    122122 * @since 3.0.0
    123123 *
    124  * @global WP_Query $wp_query Global WP_Query instance.
     124 * @global WP_Query $wp_query WordPress Query object.
    125125 */
    126126function wp_reset_postdata() {
     
    147147 * @since 1.5.0
    148148 *
    149  * @global WP_Query $wp_query Global WP_Query instance.
     149 * @global WP_Query $wp_query WordPress Query object.
    150150 *
    151151 * @return bool
     
    171171 * @since 3.1.0
    172172 *
    173  * @global WP_Query $wp_query Global WP_Query instance.
     173 * @global WP_Query $wp_query WordPress Query object.
    174174 *
    175175 * @param string|array $post_types Optional. Post type or array of posts types to check against.
     
    196196 * @since 2.0.0
    197197 *
    198  * @global WP_Query $wp_query Global WP_Query instance.
     198 * @global WP_Query $wp_query WordPress Query object.
    199199 *
    200200 * @param int|string|array|object $attachment Attachment ID, title, slug, or array of such.
     
    224224 * @since 1.5.0
    225225 *
    226  * @global WP_Query $wp_query Global WP_Query instance.
     226 * @global WP_Query $wp_query WordPress Query object.
    227227 *
    228228 * @param mixed $author Optional. User ID, nickname, nicename, or array of User IDs, nicknames, and nicenames
     
    252252 * @since 1.5.0
    253253 *
    254  * @global WP_Query $wp_query Global WP_Query instance.
     254 * @global WP_Query $wp_query WordPress Query object.
    255255 *
    256256 * @param mixed $category Optional. Category ID, name, slug, or array of Category IDs, names, and slugs.
     
    280280 * @since 2.3.0
    281281 *
    282  * @global WP_Query $wp_query Global WP_Query instance.
     282 * @global WP_Query $wp_query WordPress Query object.
    283283 *
    284284 * @param mixed $tag Optional. Tag ID, name, slug, or array of Tag IDs, names, and slugs.
     
    312312 * @since 2.5.0
    313313 *
    314  * @global WP_Query $wp_query Global WP_Query instance.
     314 * @global WP_Query $wp_query WordPress Query object.
    315315 *
    316316 * @param string|array     $taxonomy Optional. Taxonomy slug or slugs.
     
    338338 * @since 1.5.0
    339339 *
    340  * @global WP_Query $wp_query Global WP_Query instance.
     340 * @global WP_Query $wp_query WordPress Query object.
    341341 *
    342342 * @return bool
     
    364364 * @since 1.5.0
    365365 *
    366  * @global WP_Query $wp_query Global WP_Query instance.
     366 * @global WP_Query $wp_query WordPress Query object.
    367367 *
    368368 * @return bool
     
    388388 * @since 1.5.0
    389389 *
    390  * @global WP_Query $wp_query Global WP_Query instance.
     390 * @global WP_Query $wp_query WordPress Query object.
    391391 *
    392392 * @param string|array $feeds Optional feed types to check.
     
    409409 * @since 3.0.0
    410410 *
    411  * @global WP_Query $wp_query Global WP_Query instance.
     411 * @global WP_Query $wp_query WordPress Query object.
    412412 *
    413413 * @return bool
     
    442442 * @since 2.5.0
    443443 *
    444  * @global WP_Query $wp_query Global WP_Query instance.
     444 * @global WP_Query $wp_query WordPress Query object.
    445445 *
    446446 * @return bool True, if front of site.
     
    475475 *
    476476 * @see is_front_page()
    477  * @global WP_Query $wp_query Global WP_Query instance.
     477 * @global WP_Query $wp_query WordPress Query object.
    478478 *
    479479 * @return bool True if blog view homepage, otherwise false.
     
    505505 * @since 5.2.0
    506506 *
    507  * @global WP_Query $wp_query Global WP_Query instance.
     507 * @global WP_Query $wp_query WordPress Query object.
    508508 *
    509509 * @return bool
     
    529529 * @since 1.5.0
    530530 *
    531  * @global WP_Query $wp_query Global WP_Query instance.
     531 * @global WP_Query $wp_query WordPress Query object.
    532532 *
    533533 * @return bool
     
    559559 * @since 1.5.0
    560560 *
    561  * @global WP_Query $wp_query Global WP_Query instance.
     561 * @global WP_Query $wp_query WordPress Query object.
    562562 *
    563563 * @param int|string|array $page Optional. Page ID, title, slug, or array of such. Default empty.
     
    584584 * @since 1.5.0
    585585 *
    586  * @global WP_Query $wp_query Global WP_Query instance.
     586 * @global WP_Query $wp_query WordPress Query object.
    587587 *
    588588 * @return bool
     
    608608 * @since 2.0.0
    609609 *
    610  * @global WP_Query $wp_query Global WP_Query instance.
     610 * @global WP_Query $wp_query WordPress Query object.
    611611 *
    612612 * @return bool
     
    628628 * @since 2.1.0
    629629 *
    630  * @global WP_Query $wp_query Global WP_Query instance.
     630 * @global WP_Query $wp_query WordPress Query object.
    631631 *
    632632 * @return bool
     
    652652 * @since 1.5.0
    653653 *
    654  * @global WP_Query $wp_query Global WP_Query instance.
     654 * @global WP_Query $wp_query WordPress Query object.
    655655 *
    656656 * @return bool
     
    684684 * @since 1.5.0
    685685 *
    686  * @global WP_Query $wp_query Global WP_Query instance.
     686 * @global WP_Query $wp_query WordPress Query object.
    687687 *
    688688 * @param int|string|array $post Optional. Post ID, title, slug, or array of such. Default empty.
     
    716716 * @since 1.5.0
    717717 *
    718  * @global WP_Query $wp_query Global WP_Query instance.
     718 * @global WP_Query $wp_query WordPress Query object.
    719719 *
    720720 * @param string|array $post_types Optional. Post type or array of post types. Default empty.
     
    741741 * @since 1.5.0
    742742 *
    743  * @global WP_Query $wp_query Global WP_Query instance.
     743 * @global WP_Query $wp_query WordPress Query object.
    744744 *
    745745 * @return bool
     
    765765 * @since 1.5.0
    766766 *
    767  * @global WP_Query $wp_query Global WP_Query instance.
     767 * @global WP_Query $wp_query WordPress Query object.
    768768 *
    769769 * @return bool
     
    789789 * @since 1.5.0
    790790 *
    791  * @global WP_Query $wp_query Global WP_Query instance.
     791 * @global WP_Query $wp_query WordPress Query object.
    792792 *
    793793 * @return bool
     
    813813 * @since 1.5.0
    814814 *
    815  * @global WP_Query $wp_query Global WP_Query instance.
     815 * @global WP_Query $wp_query WordPress Query object.
    816816 *
    817817 * @return bool
     
    833833 * @since 4.4.0
    834834 *
    835  * @global WP_Query $wp_query Global WP_Query instance.
     835 * @global WP_Query $wp_query WordPress Query object.
    836836 *
    837837 * @return bool Whether we're in an embedded post or not.
     
    857857 * @since 3.3.0
    858858 *
    859  * @global WP_Query $wp_query Global WP_Query instance.
     859 * @global WP_Query $wp_query WordPress Query object.
    860860 *
    861861 * @return bool
     
    887887 * @since 1.5.0
    888888 *
    889  * @global WP_Query $wp_query Global WP_Query instance.
     889 * @global WP_Query $wp_query WordPress Query object.
    890890 *
    891891 * @return bool
     
    905905 * @since 2.0.0
    906906 *
    907  * @global WP_Query $wp_query Global WP_Query instance.
     907 * @global WP_Query $wp_query WordPress Query object.
    908908 *
    909909 * @return bool True if caller is within loop, false if loop hasn't started or ended.
     
    919919 * @since 1.5.0
    920920 *
    921  * @global WP_Query $wp_query Global WP_Query instance.
     921 * @global WP_Query $wp_query WordPress Query object.
    922922 */
    923923function rewind_posts() {
     
    931931 * @since 1.5.0
    932932 *
    933  * @global WP_Query $wp_query Global WP_Query instance.
     933 * @global WP_Query $wp_query WordPress Query object.
    934934 */
    935935function the_post() {
     
    947947 * @since 2.2.0
    948948 *
    949  * @global WP_Query $wp_query Global WP_Query instance.
     949 * @global WP_Query $wp_query WordPress Query object.
    950950 *
    951951 * @return bool
     
    961961 * @since 2.2.0
    962962 *
    963  * @global WP_Query $wp_query Global WP_Query instance.
     963 * @global WP_Query $wp_query WordPress Query object.
    964964 *
    965965 * @return object
     
    11281128 * @since 4.4.0 Added the ability to pass a post ID to `$post`.
    11291129 *
    1130  * @global WP_Query $wp_query Global WP_Query instance.
     1130 * @global WP_Query $wp_query WordPress Query object.
    11311131 *
    11321132 * @param WP_Post|object|int $post WP_Post instance or Post ID/object.
     
    11481148 * @since 5.2.0
    11491149 *
    1150  * @global WP_Query $wp_query Global WP_Query instance.
     1150 * @global WP_Query $wp_query WordPress Query object.
    11511151 *
    11521152 * @param WP_Post|object|int $post WP_Post instance or Post ID/object.
Note: See TracChangeset for help on using the changeset viewer.