Opened 8 years ago
Closed 6 years ago
#1913 closed enhancement (wontfix)
Expand documentation of WP_Term_Query() in Code Reference.
Reported by: | kevinwhoffman | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | Priority: | normal | |
Component: | Developer Hub | Keywords: | has-screenshots |
Cc: |
Description
With the release of 4.6, many devs will be researching WP_Term_Query() only to find that its Code Reference page has very little information. I was expecting documentation similar to WP_Query().
Upon further investigation, I found that much of the information I was looking for is actually in the docs of the WP_Term_Query::__construct() method. I only realized this after reading the DocBlock in the source code, which includes @see WP_Term_Query::__construct() for accepted arguments.
. However that info is nowhere to be found in the Code Reference. The the only way to find it is to click __construct()
in the Related section.
Can we better reflect the documentation from the __construct()
page (specifically the acceptable arguments) in the docs for WP_Term_Query()? This could be accomplished either through examples, or at least a more obvious callout that refers you to the __construct()
method for anyone researching how to format the query.
Attachments (1)
Change History (9)
#2
follow-up:
↓ 3
@
8 years ago
@DrewAPicture You're right this is a larger issue for class home pages. WP_User_Query() is also lacking, but it has a Codex page where at least some examples could be carried over.
#3
in reply to:
↑ 2
@
8 years ago
Replying to kevinwhoffman:
@DrewAPicture You're right this is a larger issue for class home pages. WP_User_Query() is also lacking, but it has a Codex page where at least some examples could be carried over.
The fact that you can view the article for WP_User_Query
in the Codex at all is a prime indication that it hasn't been migrated and redirected yet. Content migration from the Codex is in progress. :-)
This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.
8 years ago
#5
@
8 years ago
Screenshot 1913.png is a simple UI mock-up for adding parameters to Class pages. You can choose from three options:
- Use parameters from a class method.
- Use parameters from another post. (Some classes use the parameters from their parent class)
- Use Text. ( Link to parameters, or explain them )
Your thoughts on this UI are welcome.
This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.
6 years ago
#8
@
6 years ago
- Resolution set to wontfix
- Status changed from accepted to closed
This goes to the Codex Migration project for now which is supplementing parsed references with curated content. There are bigger plans to create much more definitive documentation around core APIs that will ultimately take care of this. Closing for now and handing off to the Codex Migration project.
We've been planning to do this (reflect the docs from
__construct()
and/or other methods on class homepages for all core classes. It's not the same for every class, so we'd probably do well to simply add a simple UI for choosing which method to "feature" for a class reference.