[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 21:15:46 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 MikeSchinkel):
Replying to [comment:6 jdgrimes]:
So it seems you are correct, though PHP path is unimportant here. They
just have to be declared using both PHPDoc `@var` and `global` statements
'''while in global scope'''.
Looking at core it would seem that the most appropriate place for these
would be in `/wp-includes/vars.php`. It we define and declare all well-
know WordPress global variables in that file then PhpStorm will recognize
them throughout.
'''So the question for the core committers comes to this''':
1. Would you prefer well-known WordPress global variables be documented in
every function and method where they are found,
2. Would you prefer to document all well-known WordPress global variables
'''only once''', as in `/wp-includes/vars.php`, or
3. Will we find that you ''(the core committers)'' are simply uninterested
in this and that any effort on this will be a waste of time?
If Option 1, I will post more patches for this over time.
If Option 2 I will post a new patch very soon.
If Option 3, well then...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32139#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list