From dc7baa81e924e494719c857cffbf678c70517c29 Mon Sep 17 00:00:00 2001 From: PeteMall Date: Tue, 30 Nov 2010 03:03:40 +0000 Subject: [PATCH] Remove theme udpate notification from site admin for multisite installs. git-svn-id: http://svn.automattic.com/wordpress/trunk@16620 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 299c1bd1f..5a84438e3 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -241,12 +241,14 @@ function theme_update_available( $theme ) { $update_url = wp_nonce_url('update.php?action=upgrade-theme&theme=' . urlencode($stylesheet), 'upgrade-theme_' . $stylesheet); $update_onclick = 'onclick="if ( confirm(\'' . esc_js( __("Upgrading this theme will lose any customizations you have made. 'Cancel' to stop, 'OK' to upgrade.") ) . '\') ) {return true;}return false;"'; - if ( ! current_user_can('update_themes') ) - printf( '

' . __('There is a new version of %1$s available. View version %3$s details.') . '

', $theme_name, $details_url, $update['new_version']); - else if ( empty($update['package']) ) - printf( '

' . __('There is a new version of %1$s available. View version %3$s details. Automatic upgrade is unavailable for this theme.') . '

', $theme_name, $details_url, $update['new_version']); - else - printf( '

' . __('There is a new version of %1$s available. View version %3$s details or upgrade automatically.') . '

', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); + if ( !is_multisite() ) { + if ( ! current_user_can('update_themes') ) + printf( '

' . __('There is a new version of %1$s available. View version %3$s details.') . '

', $theme_name, $details_url, $update['new_version']); + else if ( empty($update['package']) ) + printf( '

' . __('There is a new version of %1$s available. View version %3$s details. Automatic upgrade is unavailable for this theme.') . '

', $theme_name, $details_url, $update['new_version']); + else + printf( '

' . __('There is a new version of %1$s available. View version %3$s details or upgrade automatically.') . '

', $theme_name, $details_url, $update['new_version'], $update_url, $update_onclick ); + } } }