From dc074858218cdc48e3dce1a3be37301ed0dd95d2 Mon Sep 17 00:00:00 2001 From: nacin Date: Tue, 9 Nov 2010 03:28:09 +0000 Subject: [PATCH] Set $tax as the taxonomy object, and kill off our colliding global from menu construction. see #15326. git-svn-id: http://svn.automattic.com/wordpress/trunk@16253 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-tags.php | 1 + wp-admin/menu.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/edit-tags.php b/wp-admin/edit-tags.php index fbfb9ca9e4..0b14d2c301 100644 --- a/wp-admin/edit-tags.php +++ b/wp-admin/edit-tags.php @@ -8,6 +8,7 @@ /** WordPress Administration Bootstrap */ require_once('./admin.php'); +$tax = get_taxonomy( $taxnow ); if ( !current_user_can( $tax->cap->manage_terms ) ) wp_die( __( 'Cheatin’ uh?' ) ); diff --git a/wp-admin/menu.php b/wp-admin/menu.php index 8d5a10ccb8..77d5e25789 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -137,7 +137,7 @@ foreach ( (array) get_post_types( array('show_ui' => true, '_builtin' => false, $submenu["edit.php?post_type=$ptype"][$i++] = array( esc_attr( $tax->labels->menu_name ), $tax->cap->manage_terms, "edit-tags.php?taxonomy=$tax->name&post_type=$ptype" ); } } -unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i); +unset($ptype, $ptype_obj, $ptype_class, $ptype_for_id, $ptype_menu_position, $menu_icon, $i, $tax); $menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );