[wp-trac] [WordPress Trac] #32139: Add PHPDoc for all global $wp_query in /wp-includes/query.php

WordPress Trac noreply at wordpress.org
Mon Apr 27 18:44:31 UTC 2015


#32139: Add PHPDoc for all global $wp_query in /wp-includes/query.php
------------------------------------+------------------------------
 Reporter:  MikeSchinkel            |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Query                   |     Version:  trunk
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |     Focuses:  docs
------------------------------------+------------------------------

Comment (by jdgrimes):

 Replying to [comment:5 MikeSchinkel]:
 > In `/phpdoc/globals.php` I added the following:
 >
 > {{{
 > <?php
 > /**
 >  * @var WP_Query $wp_query
 >  */
 > }}}

 I think you have to add `global $wp_query` right under there.

 > ''(BTW, doing it with the PHP path seems like just a hack for PhpStorm;
 documenting every location at the source seems more like the correct thing
 to do since it is not just for PhpStorm, no?)''

 Maybe so. It just seems like a huge amount of redundancy. Especially since
 it's already pretty easy to guess what class it is anyway (`$wpdb` ->
 `wpdb`, `$wp_query` -> `WP_Query`, `$wp_filesystem` -> `WP_Filesystem*`,
 etc.).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32139#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list