Skip to content

Commit 4fab2ae

Browse files
committed
Use get_taxonomies() when iterating taxonomies for menus. props wojtek.szkutnik. fixes #13936
git-svn-id: https://develop.svn.wordpress.org/trunk@16695 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 3da3960 commit 4fab2ae

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

wp-admin/menu.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
$submenu['edit.php'][10] = array( _x('Add New', 'post'), 'edit_posts', 'post-new.php' );
6464

6565
$i = 15;
66-
foreach ( $wp_taxonomies as $tax ) {
66+
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
6767
if ( ! $tax->show_ui || ! in_array('post', (array) $tax->object_type, true) )
6868
continue;
6969

@@ -87,7 +87,7 @@
8787
/* translators: add new page */
8888
$submenu['edit.php?post_type=page'][10] = array( _x('Add New', 'page'), 'edit_pages', 'post-new.php?post_type=page' );
8989
$i = 15;
90-
foreach ( $wp_taxonomies as $tax ) {
90+
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
9191
if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) )
9292
continue;
9393

@@ -127,7 +127,7 @@
127127
$submenu["edit.php?post_type=$ptype"][10] = array( $ptype_obj->labels->add_new, $ptype_obj->cap->edit_posts, "post-new.php?post_type=$ptype" );
128128

129129
$i = 15;
130-
foreach ( $wp_taxonomies as $tax ) {
130+
foreach ( get_taxonomies( array(), 'objects' ) as $tax ) {
131131
if ( ! $tax->show_ui || ! in_array($ptype, (array) $tax->object_type, true) )
132132
continue;
133133

0 commit comments

Comments
 (0)