Opened 8 years ago
Last modified 6 years ago
#38283 new defect (bug)
Some `WP_Query` query vars undocumented
Reported by: | jdgrimes | Owned by: | |
---|---|---|---|
Milestone: | Future Release | Priority: | normal |
Severity: | normal | Version: | |
Component: | Query | Keywords: | has-patch needs-refresh |
Focuses: | docs | Cc: |
Description
While working on #38276, I noticed that the has_password
and post_password
query args (added in [27395]) aren't included in the inline docs for WP_Query::parse_query()
with the other args. I did a search for all of the args used in WP_Query
, and discovered that the following args are used but not documented:
attachment caller_get_posts embed error feed has_password minute post_password posts_per_rss preview robots search_orderby_title search_terms search_terms_count showposts static subpost subpost_id taxonomy tb term term_id withcomments withoutcomments
Some of these may be deprecated, discouraged, or internal. If there has been a previous decision not to include them for some reason, then I apologize for bringing it up. But I couldn't find any tickets relating to the password related args not being documented, so I have a feeling that some of these may have just been overlooked.
Perhaps some of these shouldn't be documented, although we could document deprecated args and that they are deprecated, rather than just leaving them out. But at least this ticket will provide us a central place where we can state why certain ones aren't going to be documented, if indeed that's the decision.
Hi @jdgrimes - Based on the internal logic of
WP_Query
- I haven't yet dug into the changelogs - at least some of these params are, as you suggest, deprecated. 'subpost', 'subpost_id', and 'caller_get_posts' are the three I noticed on a quick search. I don't think we want these documented as accepted parameters.Those params that are currently in use - like 'attachment' and 'embed', among (I'm sure) many others on your list - should probably get documentation.
So, anyone who wants to tackle this issue will have to look at each param on a case-by-case basis.