First pass at giving taxonomies a show_ui param. See #10773

git-svn-id: https://develop.svn.wordpress.org/trunk@13216 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-02-19 10:21:29 +00:00
parent 81e3891ed8
commit 7cdc6568d0
2 changed files with 25 additions and 6 deletions
+2 -2
View File
@@ -57,7 +57,7 @@ $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu
$i = 15;
foreach ( $wp_taxonomies as $tax ) {
if ( ! in_array('post', (array) $tax->object_type, true) )
if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) )
continue;
$submenu['edit.php'][$i++] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name );
@@ -94,7 +94,7 @@ foreach ( (array) get_post_types( array('show_ui' => true) ) as $ptype ) {
$i = 15;
foreach ( $wp_taxonomies as $tax ) {
if ( ! in_array($ptype, (array) $tax->object_type, true) )
if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) )
continue;
$submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr($tax->label), 'manage_categories', "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );