Fix undefined offset warnings on pages the current user does not have perms for. Props wpdavis. fixes #15469

git-svn-id: http://svn.automattic.com/wordpress/trunk@16471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-11-18 19:55:05 +00:00
parent 0d7979ea9a
commit a216b1ed8f
1 changed files with 2 additions and 2 deletions

View File

@ -205,11 +205,11 @@ if ( apply_filters('custom_menu_order', false) ) {
unset($menu_order, $default_menu_order);
}
$menu = add_menu_classes($menu);
if ( !user_can_access_admin_page() ) {
do_action('admin_page_access_denied');
wp_die( __('You do not have sufficient permissions to access this page.') );
}
$menu = add_menu_classes($menu);
?>