mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
Rationalize menu access levels. Submenus should have an access level greater than or equal to its parent. Require level 8 for all file editing pages.
git-svn-id: https://develop.svn.wordpress.org/trunk@1924 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -639,17 +639,12 @@ function parent_dropdown($default = 0, $parent = 0, $level = 0) {
|
||||
}
|
||||
|
||||
function user_can_access_admin_page() {
|
||||
global $parent_file;
|
||||
global $pagenow;
|
||||
global $menu;
|
||||
global $submenu;
|
||||
global $user_level;
|
||||
|
||||
if (! isset($parent_file)) {
|
||||
$parent = $pagenow;
|
||||
} else {
|
||||
$parent = $parent_file;
|
||||
}
|
||||
$parent = get_admin_page_parent();
|
||||
|
||||
foreach ($menu as $menu_array) {
|
||||
//echo "parent array: " . $menu_array[2];
|
||||
|
||||
Reference in New Issue
Block a user