Use get_taxonomies() when iterating taxonomies for menus. props wojtek.szkutnik. fixes #13936

git-svn-id: http://svn.automattic.com/wordpress/trunk@16695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2010-12-02 21:32:19 +00:00
parent f2d1e78ec6
commit 775c840d95

View File

@ -63,7 +63,7 @@ $menu[5] = array( __('Posts'), 'edit_posts', 'edit.php', '', 'open-if-no-js menu
$submenu['edit.php'][10] = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' );
$i = 15;
foreach ( $wp_taxonomies as $tax ) {
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) )
continue;
@ -87,7 +87,7 @@ $menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'me
/* translators: add new page */
$submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' );
$i = 15;
foreach ( $wp_taxonomies as $tax ) {
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) )
continue;
@ -127,7 +127,7 @@ foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false,
$submenu["edit.php?post_type=$ptype"][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" );
$i = 15;
foreach ( $wp_taxonomies as $tax ) {
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) )
continue;