Menu fixes
git-svn-id: http://svn.automattic.com/wordpress/trunk@11565 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3ba803dc49
commit
4e6f054b47
|
@ -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 ) ) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue