Custom taxonomies: fix menu for large number of taxonomies
git-svn-id: http://svn.automattic.com/wordpress/trunk@10566 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4c5da3c279
commit
55a01dd456
|
@ -35,14 +35,14 @@ $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'wp-menu-open menu-
|
|||
|
||||
$i = 15;
|
||||
foreach ( $wp_taxonomies as $tax ) {
|
||||
if ( 'category' == $tax->name || 'link_category' == $tax->name )
|
||||
if ( $tax->hierarchical || ! in_array('post', (array) $tax->object_type, true) )
|
||||
continue;
|
||||
|
||||
$submenu['edit.php'][$i] = array( attribute_escape($tax->label), 'manage_categories', 'edit-tags.php?taxonomy=' . $tax->name );
|
||||
++$i;
|
||||
}
|
||||
|
||||
$submenu['edit.php'][20] = array( __('Categories'), 'manage_categories', 'categories.php' );
|
||||
$submenu['edit.php'][50] = array( __('Categories'), 'manage_categories', 'categories.php' );
|
||||
|
||||
$menu[10] = array( __('Media'), 'upload_files', 'upload.php', '', 'menu-top', 'menu-media', 'div' );
|
||||
$submenu['upload.php'][5] = array( __('Library'), 'upload_files', 'upload.php');
|
||||
|
|
Loading…
Reference in New Issue