From 3dae667671ca7ccb9c25f6c7e33ac54e2a649253 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 26 May 2010 19:03:46 +0000 Subject: [PATCH] Show taxonomies registered against the page type in the Pages submenus. Props markauk. fixes #13560 git-svn-id: http://svn.automattic.com/wordpress/trunk@14953 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/menu.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 0d43b94db..daeb1fb3d 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -108,6 +108,14 @@ $menu[20] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page', '', 'me $submenu['edit.php?post_type=page'][5] = array( __('Pages'), 'edit_pages', 'edit.php?post_type=page' ); /* 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 ) { + if ( ! $tax->show_ui || ! in_array('page', (array) $tax->object_type, true) ) + continue; + + $submenu['edit.php?post_type=page'][$i++] = array( esc_attr( $tax->labels->name ), $tax->cap->manage_terms, 'edit-tags.php?taxonomy=' . $tax->name ); + } + unset($tax); $menu[25] = array( sprintf( __('Comments %s'), "" . number_format_i18n($awaiting_mod) . "" ), 'edit_posts', 'edit-comments.php', '', 'menu-top menu-icon-comments', 'menu-comments', 'div' );