WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#27720 closed feature request (duplicate)

post_type argument needed for wp_terms

Reported by: neonWired Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.8.1
Component: Taxonomy Keywords:
Focuses: Cc:

Description

Could do with arg for wp_terms to allow wp_terms to return taxs with private posts. Currently taxonomy terms act as if they are empty when they only contain private posts so if you're working on a site that's entirely private, there no way to use wp_terms.

Change History (2)

#1 @wonderboymusic
7 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to maybelater
  • Status changed from new to closed

There is no function called wp_terms()... perhaps you mean the_terms()?

the_terms() is problematic because it already has 5 arguments. You might want to check wp_get_object_terms() instead.

Because we maintain backwards compatibility, the_terms() will always (probably!) have 5 arguments, but we shouldn't add a 6th. Functions that have 6 arguments indicate bad design. In almost every case, a function like that should have have been saner_func( $args = array() )

#2 @wonderboymusic
7 years ago

  • Resolution changed from maybelater to duplicate

Duplicate of #18106.

This is a better resolution.

Note: See TracTickets for help on using tickets.