Making WordPress.org

Opened 8 years ago

Closed 6 years ago

#1913 closed enhancement (wontfix)

Expand documentation of WP_Term_Query() in Code Reference.

Reported by: kevinwhoffman's profile kevinwhoffman Owned by: drewapicture's profile 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)

1913.png (41.8 KB) - added by keesiemeijer 8 years ago.
simple UI for adding parameters

Download all attachments as: .zip

Change History (9)

#1 @DrewAPicture
8 years ago

  • Owner set to DrewAPicture
  • Status changed from new to accepted

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.

#2 follow-up: @kevinwhoffman
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 @DrewAPicture
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

@keesiemeijer
8 years ago

simple UI for adding parameters

#5 @keesiemeijer
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.

#6 @keesiemeijer
8 years ago

  • Keywords has-screenshots added

This ticket was mentioned in Slack in #meta-devhub by drew. View the logs.


6 years ago

#8 @DrewAPicture
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.

Note: See TracTickets for help on using tickets.