Link to network/update-core when running multisite. Remove theme/plugin editors from blog menu when running multisite. Redirect to network/* when accessing theme/plugin-install/editor. props ocean90, see #15525.
git-svn-id: http://svn.automattic.com/wordpress/trunk@16747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -151,7 +151,8 @@ if ( current_user_can( 'switch_themes') ) {
|
||||
}
|
||||
|
||||
// Add 'Editor' to the bottom of the Appearence menu.
|
||||
add_action('admin_menu', '_add_themes_utility_last', 101);
|
||||
if ( ! is_multisite() )
|
||||
add_action('admin_menu', '_add_themes_utility_last', 101);
|
||||
function _add_themes_utility_last() {
|
||||
// Must use API on the admin_menu hook, direct modification is only possible on/before the _admin_menu hook
|
||||
add_submenu_page('themes.php', _x('Editor', 'theme editor'), _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php');
|
||||
@@ -171,7 +172,8 @@ if ( is_super_admin() || ( is_multisite() && isset($menu_perms['plugins']) && $m
|
||||
$submenu['plugins.php'][5] = array( __('Plugins'), 'activate_plugins', 'plugins.php' );
|
||||
/* translators: add new plugin */
|
||||
$submenu['plugins.php'][10] = array(_x('Add New', 'plugin'), 'install_plugins', 'plugin-install.php');
|
||||
$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
if ( ! is_multisite() )
|
||||
$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
|
||||
}
|
||||
unset($menu_perms, $update_plugins, $update_count);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user