';
if ( ! current_user_can('update_plugins') )
@@ -198,7 +198,7 @@ function wp_plugin_update_row( $file, $plugin_data ) {
else if ( empty($r->package) )
printf( __('There is a new version of %1$s available.
View version %4$s details.
Automatic upgrade is unavailable for this plugin.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version );
else
- printf( __('There is a new version of %1$s available.
View version %4$s details or
upgrade automatically.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url('update.php?action=upgrade-plugin&plugin=' . $file, 'upgrade-plugin_' . $file) );
+ printf( __('There is a new version of %1$s available.
View version %4$s details or
upgrade automatically.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version, wp_nonce_url( self_admin_url('update.php?action=upgrade-plugin&plugin=') . $file, 'upgrade-plugin_' . $file) );
do_action( "in_plugin_update_message-$file", $plugin_data, $r );
diff --git a/wp-admin/network/menu.php b/wp-admin/network/menu.php
index 1c9fcf2f35..5a0b2fd3fd 100644
--- a/wp-admin/network/menu.php
+++ b/wp-admin/network/menu.php
@@ -9,19 +9,23 @@ $menu[4] = array( '', 'read', 'separator1', '', 'wp-menu-separator' );
$menu[5] = array(__('Sites'), 'manage_sites', 'sites.php', '', 'menu-top menu-icon-site', 'menu-site', 'div');
$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');
-$menu[20] = array(__('Plugins'), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
+
+$plugin_update_count = 0;
+$update_plugins = get_site_transient( 'update_plugins' );
+if ( !empty($update_plugins->response) )
+ $plugin_update_count = count( $update_plugins->response );
+$menu[20] = array(sprintf( __('Plugins %s'), "
" . number_format_i18n($plugin_update_count) . "" ), 'manage_network_plugins', 'plugins.php', '', 'menu-top menu-icon-plugins', 'menu-plugins', 'div');
+$submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' );
+$submenu['plugins.php'][10] = array( _x('Add New', 'plugin editor'), 'install_plugins', 'plugin-install.php' );
+$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
+
+
$menu[25] = array(__('Settings'), 'manage_network_options', 'settings.php', '', 'menu-top menu-icon-settings', 'menu-settings', 'div');
$menu[30] = array(__('Update'), 'manage_network', 'upgrade.php', '', 'menu-top menu-icon-tools', 'menu-update', 'div');
$menu[99] = array( '', 'read', 'separator-last', '', 'wp-menu-separator-last' );
-$compat = array();
-$submenu = array();
-
-$submenu['plugins.php'][5] = array( __('Plugins'), 'manage_network_plugins', 'plugins.php' );
-$submenu['plugins.php'][15] = array( _x('Editor', 'plugin editor'), 'edit_plugins', 'plugin-editor.php' );
-
-$submenu['themes.php'][5] = array( __('Themes'), 'manage_network_themes', 'themes.php' );
+$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');
diff --git a/wp-admin/network/plugin-install.php b/wp-admin/network/plugin-install.php
new file mode 100644
index 0000000000..46396c62c0
--- /dev/null
+++ b/wp-admin/network/plugin-install.php
@@ -0,0 +1,5 @@
+' . __('
Support Forums') . ''
);
-include('./admin-header.php');
+include(ABSPATH . 'wp-admin/admin-header.php');
?>
@@ -47,5 +47,5 @@ include('./admin-header.php');
upgrade($plugin);
- include('./admin-footer.php');
+ include(ABSPATH . 'wp-admin/admin-footer.php');
} elseif ('activate-plugin' == $action ) {
if ( ! current_user_can('update_plugins') )
@@ -107,7 +107,7 @@ if ( isset($_GET['action']) ) {
$title = __('Plugin Install');
$parent_file = 'plugins.php';
$submenu_file = 'plugin-install.php';
- require_once('./admin-header.php');
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
$title = sprintf( __('Installing Plugin: %s'), $api->name . ' ' . $api->version );
$nonce = 'install-plugin_' . $plugin;
@@ -120,7 +120,7 @@ if ( isset($_GET['action']) ) {
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
$upgrader->install($api->download_link);
- include('./admin-footer.php');
+ include(ABSPATH . 'wp-admin/admin-footer.php');
} elseif ( 'upload-plugin' == $action ) {
@@ -134,7 +134,7 @@ if ( isset($_GET['action']) ) {
$title = __('Upload Plugin');
$parent_file = 'plugins.php';
$submenu_file = 'plugin-install.php';
- require_once('./admin-header.php');
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
$title = sprintf( __('Installing Plugin from uploaded file: %s'), basename( $file_upload->filename ) );
$nonce = 'plugin-upload';
@@ -144,7 +144,7 @@ if ( isset($_GET['action']) ) {
$upgrader = new Plugin_Upgrader( new Plugin_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
$upgrader->install( $file_upload->package );
- include('./admin-footer.php');
+ include(ABSPATH . 'wp-admin/admin-footer.php');
} elseif ( 'upgrade-theme' == $action ) {
@@ -158,7 +158,7 @@ if ( isset($_GET['action']) ) {
$title = __('Upgrade Theme');
$parent_file = 'themes.php';
$submenu_file = 'themes.php';
- require_once('./admin-header.php');
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
$nonce = 'upgrade-theme_' . $theme;
$url = 'update.php?action=upgrade-theme&theme=' . $theme;
@@ -166,7 +166,7 @@ if ( isset($_GET['action']) ) {
$upgrader = new Theme_Upgrader( new Theme_Upgrader_Skin( compact('title', 'nonce', 'url', 'theme') ) );
$upgrader->upgrade($theme);
- include('./admin-footer.php');
+ include(ABSPATH . 'wp-admin/admin-footer.php');
} elseif ( 'update-selected-themes' == $action ) {
if ( ! current_user_can( 'update_themes' ) )
wp_die( __( 'You do not have sufficient permissions to update themes for this site.' ) );
@@ -211,7 +211,7 @@ if ( isset($_GET['action']) ) {
$title = __('Install Themes');
$parent_file = 'themes.php';
$submenu_file = 'themes.php';
- require_once('./admin-header.php');
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
$title = sprintf( __('Installing Theme: %s'), $api->name . ' ' . $api->version );
$nonce = 'install-theme_' . $theme;
@@ -221,7 +221,7 @@ if ( isset($_GET['action']) ) {
$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('title', 'url', 'nonce', 'plugin', 'api') ) );
$upgrader->install($api->download_link);
- include('./admin-footer.php');
+ include(ABSPATH . 'wp-admin/admin-footer.php');
} elseif ( 'upload-theme' == $action ) {
@@ -237,7 +237,7 @@ if ( isset($_GET['action']) ) {
$submenu_file = 'theme-install.php';
add_thickbox();
wp_enqueue_script('theme-preview');
- require_once('./admin-header.php');
+ require_once(ABSPATH . 'wp-admin/admin-header.php');
$title = sprintf( __('Installing Theme from uploaded file: %s'), basename( $file_upload->filename ) );
$nonce = 'theme-upload';
@@ -247,7 +247,7 @@ if ( isset($_GET['action']) ) {
$upgrader = new Theme_Upgrader( new Theme_Installer_Skin( compact('type', 'title', 'nonce', 'url') ) );
$upgrader->install( $file_upload->package );
- include('./admin-footer.php');
+ include(ABSPATH . 'wp-admin/admin-footer.php');
} else {
do_action('update-custom_' . $action);