mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@43386 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -728,7 +728,7 @@ function wp_admin_bar_edit_menu( $wp_admin_bar ) {
|
||||
} elseif ( 'term' == $current_screen->base
|
||||
&& isset( $tag ) && is_object( $tag ) && ! is_wp_error( $tag )
|
||||
&& ( $tax = get_taxonomy( $tag->taxonomy ) )
|
||||
&& $tax->public ) {
|
||||
&& is_taxonomy_viewable( $tax ) ) {
|
||||
$wp_admin_bar->add_menu(
|
||||
array(
|
||||
'id' => 'view',
|
||||
|
||||
Reference in New Issue
Block a user