diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 1b96894fa..4bfc0e9ad 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -1358,11 +1358,11 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { ); if ( $this->type == 'web' ) - $install_actions['themes_page'] = '' . __('Return to Theme Installer') . ''; + $install_actions['themes_page'] = '' . __('Return to Theme Installer') . ''; else - $install_actions['themes_page'] = '' . __('Return to Themes page') . ''; + $install_actions['themes_page'] = '' . __('Return to Themes page') . ''; - if ( ! $this->result || is_wp_error($this->result) ) + if ( ! $this->result || is_wp_error($this->result) || is_network_admin() ) unset( $install_actions['activate'], $install_actions['preview'] ); $install_actions = apply_filters('install_theme_complete_actions', $install_actions, $this->api, $stylesheet, $theme_info); diff --git a/wp-admin/includes/default-list-tables.php b/wp-admin/includes/default-list-tables.php index 479b917d6..3a4819086 100644 --- a/wp-admin/includes/default-list-tables.php +++ b/wp-admin/includes/default-list-tables.php @@ -4184,7 +4184,7 @@ class WP_Theme_Install_Table extends WP_List_Table { $display_tabs = array(); foreach ( (array) $tabs as $action => $text ) { $class = ( $action == $tab ) ? ' class="current"' : ''; - $href = admin_url('theme-install.php?tab=' . $action); + $href = self_admin_url('theme-install.php?tab=' . $action); $display_tabs[$action] = "$text"; } diff --git a/wp-admin/includes/theme-install.php b/wp-admin/includes/theme-install.php index e5ea59913..0598eb174 100644 --- a/wp-admin/includes/theme-install.php +++ b/wp-admin/includes/theme-install.php @@ -77,7 +77,7 @@ function install_themes_dashboard() { install_theme_search_form(); ?>

-
+

- + preview_url . '?TB_iframe=true&width=600&height=400'; if ( !is_array($actions) ) { $actions = array(); - $actions[] = 'slug . '&TB_iframe=true&tbWidth=500&tbHeight=385') . '" class="thickbox thickbox-preview onclick" title="' . esc_attr(sprintf(__('Install “%s”'), $name)) . '">' . __('Install') . ''; - $actions[] = '' . __('Preview') . ''; + if ( !is_network_admin() ) + $actions[] = '' . __('Preview') . ''; $actions = apply_filters('theme_install_action_links', $actions, $theme); } @@ -288,12 +289,12 @@ switch ( $type ) { default: case 'install': if ( current_user_can('install_themes') ) : - $buttons .= '' . __('Install Now') . ''; + $buttons .= '' . __('Install Now') . ''; endif; break; case 'update_available': if ( current_user_can('update_themes') ) : - $buttons .= '' . __('Install Update Now') . ''; + $buttons .= '' . __('Install Update Now') . ''; endif; break; case 'newer_installed': diff --git a/wp-admin/network/menu.php b/wp-admin/network/menu.php index 32ab5f2fc..0ada15011 100644 --- a/wp-admin/network/menu.php +++ b/wp-admin/network/menu.php @@ -19,7 +19,11 @@ $submenu['sites.php'][5] = array( __('Sites'), 'manage_sites', 'sites.php' ); $submenu['sites.php'][10] = array( __('Add New'), 'manage_sites', 'site-new.php' ); $menu[10] = array(__('Users'), 'manage_network_users', 'users.php', '', 'menu-top menu-icon-users', 'menu-users', 'div'); + $menu[15] = array(__('Themes'), 'manage_network_themes', 'themes.php', '', 'menu-top menu-icon-appearance', 'menu-appearance', 'div'); +$submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); +$submenu['themes.php'][10] = array( _x('Add New', 'theme'), 'manage_network_themes', 'theme-install.php' ); +$submenu['themes.php'][15] = array( _x('Editor', 'theme editor'), 'edit_themes', 'theme-editor.php' ); $plugin_update_count = $theme_update_count = $wordpress_update_count = 0; $update_plugins = get_site_transient( 'update_plugins' ); @@ -59,9 +63,6 @@ unset($plugin_update_count, $theme_update_count, $wordpress_update_count, $updat $menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' ); -$submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' ); -$submenu['themes.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_themes', 'theme-editor.php' ); - require_once(ABSPATH . 'wp-admin/includes/menu.php'); ?> \ No newline at end of file diff --git a/wp-admin/network/theme-install.php b/wp-admin/network/theme-install.php new file mode 100644 index 000000000..01df98acb --- /dev/null +++ b/wp-admin/network/theme-install.php @@ -0,0 +1,12 @@ +prepare_items(); $title = __('Install Themes'); $parent_file = 'themes.php'; -$submenu_file = 'themes.php'; +if ( !is_network_admin() ) + $submenu_file = 'themes.php'; wp_enqueue_style( 'theme-install' ); wp_enqueue_script( 'theme-install' ); @@ -35,17 +36,25 @@ $help .= '

' . __('Support Forums') . '

'; add_contextual_help($current_screen, $help); -include('./admin-header.php'); +include(ABSPATH . 'wp-admin/admin-header.php'); ?>
- + +

+

-views(); ?> +views(); ?>