[wp-trac] [WordPress Trac] #56215: Introduce `is_term_publicly_viewable()` function

WordPress Trac noreply at wordpress.org
Sun Aug 14 23:31:30 UTC 2022


#56215: Introduce `is_term_publicly_viewable()` function
--------------------------------------+--------------------------
 Reporter:  johnbillion               |       Owner:  johnbillion
     Type:  enhancement               |      Status:  closed
 Priority:  normal                    |   Milestone:  6.1
Component:  Taxonomy                  |     Version:
 Severity:  normal                    |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+--------------------------

Comment (by johnbillion):

 There are a few places in core now that don't handle shared terms, ie by
 only passing a term ID to `get_term()`.

 Examples:

 * https://github.com/WordPress/wordpress-
 develop/blob/d51b039755431df833162d1a3a72ac5d3812ee24/src/wp-includes
 /rest-api/search/class-wp-rest-term-search-handler.php#L142-L147
 * https://github.com/WordPress/wordpress-
 develop/blob/d51b039755431df833162d1a3a72ac5d3812ee24/src/wp-includes
 /rest-api.php#L3138-L3146

 Do you think this function needs a `$taxonomy` parameter?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56215#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list