Skip to content

Commit

Permalink
Menu fixes
Browse files Browse the repository at this point in the history
git-svn-id: https://develop.svn.wordpress.org/branches/2.8@11566 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ryanboren committed Jun 15, 2009
1 parent 056e747 commit 89145e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wp-admin/includes/plugin.php
Expand Up @@ -944,6 +944,9 @@ function user_can_access_admin_page() {
return true;
}

if ( isset( $plugin_page ) && ( $plugin_page == $parent ) && isset( $_wp_menu_nopriv[$plugin_page] ) )
return false;

if ( isset( $submenu[$parent] ) ) {
foreach ( $submenu[$parent] as $submenu_array ) {
if ( isset( $plugin_page ) && ( $submenu_array[2] == $plugin_page ) ) {
Expand Down
1 change: 1 addition & 0 deletions wp-includes/plugin.php
Expand Up @@ -495,6 +495,7 @@ function plugin_basename($file) {
$mu_plugin_dir = str_replace('\\','/',WPMU_PLUGIN_DIR); // sanitize for Win32 installs
$mu_plugin_dir = preg_replace('|/+|','/', $mu_plugin_dir); // remove any duplicate slash
$file = preg_replace('#^' . preg_quote($plugin_dir, '#') . '/|^' . preg_quote($mu_plugin_dir, '#') . '/#','',$file); // get relative path from plugins dir
$file = trim($file, '/');
return $file;
}

Expand Down

0 comments on commit 89145e4

Please sign in to comment.