mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Merge Categories/Hierarchical taxonomies into edit-tags.php. See #11838
git-svn-id: https://develop.svn.wordpress.org/trunk@12818 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -50,11 +50,7 @@ $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu
|
||||
if ( ! in_array('post', (array) $tax->object_type, true) )
|
||||
continue;
|
||||
|
||||
if ( $tax->hierarchical )
|
||||
$submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'categories.php?taxonomy=' . $tax->name );
|
||||
else
|
||||
$submenu['edit.php'][$i] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name );
|
||||
++$i;
|
||||
$submenu['edit.php'][$i++] = array( esc_attr($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name );
|
||||
}
|
||||
|
||||
$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' );
|
||||
@@ -90,11 +86,7 @@ foreach ( (array) get_post_types( array('_show' => true) ) as $ptype ) {
|
||||
if ( ! in_array($ptype, (array) $tax->object_type, true) )
|
||||
continue;
|
||||
|
||||
if ( $tax->hierarchical )
|
||||
$submenu["edit.php?post_type=$ptype"][$i] = array( esc_attr($tax->label), 'manage_categories', "categories.php?taxonomy=$tax->name&post_type=$ptype" );
|
||||
else
|
||||
$submenu["edit.php?post_type=$ptype"][$i] = array( esc_attr($tax->label), 'manage_categories', "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
|
||||
++$i;
|
||||
$submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr($tax->label), 'manage_categories', "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" );
|
||||
}
|
||||
}
|
||||
unset($ptype, $ptype_obj);
|
||||
|
||||
Reference in New Issue
Block a user