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:
parent
0d7979ea9a
commit
a216b1ed8f
|
@ -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);
|
||||
|
||||
?>
|
Loading…
Reference in New Issue