Changeset 53893
- Timestamp:
- 08/13/2022 10:42:12 PM (2 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-terms-list-table.php
r53174 r53893 461 461 $tag = $item; 462 462 $taxonomy = $this->screen->taxonomy; 463 $tax = get_taxonomy( $taxonomy );464 463 $uri = wp_doing_ajax() ? wp_get_referer() : $_SERVER['REQUEST_URI']; 465 464 … … 498 497 } 499 498 500 if ( is_t axonomy_viewable( $tax) ) {499 if ( is_term_publicly_viewable( $tag ) ) { 501 500 $actions['view'] = sprintf( 502 501 '<a href="%s" aria-label="%s">%s</a>', -
trunk/src/wp-includes/admin-bar.php
r53745 r53893 810 810 } elseif ( 'term' === $current_screen->base && isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag ) ) { 811 811 $tax = get_taxonomy( $tag->taxonomy ); 812 if ( is_t axonomy_viewable( $tax) ) {812 if ( is_term_publicly_viewable( $tag ) ) { 813 813 $wp_admin_bar->add_node( 814 814 array( -
trunk/src/wp-includes/taxonomy.php
r53877 r53893 4994 4994 4995 4995 /** 4996 * Determines whether a term is publicly viewable. 4997 * 4998 * A term is considered publicly viewable if its taxonomy is viewable. 4999 * 5000 * @since 6.1.0 5001 * 5002 * @param int|WP_Term $term Term ID or term object. 5003 * @return bool Whether the term is publicly viewable. 5004 */ 5005 function is_term_publicly_viewable( $term ) { 5006 $term = get_term( $term ); 5007 5008 if ( ! $term ) { 5009 return false; 5010 } 5011 5012 return is_taxonomy_viewable( $term->taxonomy ); 5013 } 5014 5015 /** 4996 5016 * Sets the last changed time for the 'terms' cache group. 4997 5017 *
Note: See TracChangeset
for help on using the changeset viewer.