mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 17:48:01 +01:00
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
This commit is contained in:
parent
e58e4a2345
commit
dc07485821
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
/** WordPress Administration Bootstrap */
|
/** WordPress Administration Bootstrap */
|
||||||
require_once('./admin.php');
|
require_once('./admin.php');
|
||||||
|
$tax = get_taxonomy( $taxnow );
|
||||||
if ( !current_user_can( $tax->cap->manage_terms ) )
|
if ( !current_user_can( $tax->cap->manage_terms ) )
|
||||||
wp_die( __( 'Cheatin’ uh?' ) );
|
wp_die( __( 'Cheatin’ uh?' ) );
|
||||||
|
|
||||||
|
@ -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" );
|
$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' );
|
$menu[59] = array( '', 'read', 'separator2', '', 'wp-menu-separator' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user