Make WordPress Core


Ignore:
Timestamp:
07/03/2018 10:28:39 AM (7 years ago)
Author:
flixos90
Message:

Taxonomy: Introduce is_taxonomy_viewable().

This utility function allows for easy detection whether terms for a taxonomy are considered publicly viewable.

Props andizer.
Fixes #44466.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/admin-bar.php

    r42843 r43386  
    729729            && isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag )
    730730            && ( $tax = get_taxonomy( $tag->taxonomy ) )
    731             && $tax->public ) {
     731            && is_taxonomy_viewable( $tax ) ) {
    732732            $wp_admin_bar->add_menu(
    733733                array(
Note: See TracChangeset for help on using the changeset viewer.