git-svn-id: https://develop.svn.wordpress.org/trunk@4093 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2006-08-14 21:24:43 +00:00
parent 4213e51be1
commit d143a5ac02
2 changed files with 34 additions and 23 deletions
+8 -2
View File
@@ -1489,13 +1489,19 @@ function add_submenu_page($parent, $page_title, $menu_title, $access_level, $fil
global $submenu;
global $menu;
global $real_parent_file;
global $menu_nopriv;
$file = plugin_basename($file);
//echo "Adding $parent $file $access_level<br />";
if ( !current_user_can($access_level) ) {
$menu_nopriv[$file] = true;
return false;
}
$parent = plugin_basename($parent);
if ( isset($real_parent_file[$parent]) )
$parent = $real_parent_file[$parent];
$file = plugin_basename($file);
// If the parent doesn't already have a submenu, add a link to the parent
// as the first item in the submenu. If the submenu file is the same as the
// parent file someone is trying to link back to the parent manually. In