WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 3 years ago

#37075 closed enhancement (fixed)

get_terms() argument documentation should point to WP_Term_Query::__construct()

Reported by: boonebgorges Owned by: sjmur
Milestone: 4.8 Priority: normal
Severity: normal Version:
Component: Taxonomy Keywords: good-first-bug has-patch
Focuses: docs Cc:

Description

After [37572], it doesn't make sense to keep complete documentation of arguments on get_terms(). We should (a) verify that all of the relevant argument documentation has been moved to WP_Term_Query::__construct(), and then (b) replace the $args documentation on get_terms() with a pointer to WP_Term_Query. See get_comments() and get_users() for examples.

Attachments (2)

37075.patch (7.8 KB) - added by shashwatmittal 3 years ago.
Added all the relevant arguments in the documentation and pointed it to WP_Term_Query::construct()
37075.2.patch (7.8 KB) - added by shashwatmittal 3 years ago.
Updated the Formatting.

Download all attachments as: .zip

Change History (8)

#1 @sjmur
4 years ago

Hey, I'd like to take this and fix the doc.

#2 @boonebgorges
4 years ago

  • Owner set to sjmur
  • Status changed from new to assigned

All yours :)

This ticket was mentioned in Slack in #docs by morganestes. View the logs.


4 years ago

@shashwatmittal
3 years ago

Added all the relevant arguments in the documentation and pointed it to WP_Term_Query::construct()

@shashwatmittal
3 years ago

Updated the Formatting.

#4 @shashwatmittal
3 years ago

  • Keywords has-patch added; needs-patch removed

#5 @boonebgorges
3 years ago

  • Milestone changed from Awaiting Review to 4.8

@shashwatmittal Thanks for the patch! (Note for the future: attachments don't trigger email notifications, so you should accompany your patches with a comment.) It looks like 37075.2.patch has gone a bit stale, but I'll clean it up.

#6 @boonebgorges
3 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 40292:

Streamline get_terms() parameter documentation.

Since 4.6, get_terms() has been a wrapper for WP_Term_Query.
Full parameter documentation lives with the class, and
get_terms() should reference rather than duplicate it.

Props shashwatmittal.
Fixes #37075.

Note: See TracTickets for help on using tickets.