X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/fef8173b8c3bad08f495551e43cfdeac1cae6021..9c2096d803812dacbdf6cf8efe90053e39f00b96:/wp-admin/includes/update.php diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 06e06c24..f8240245 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -26,7 +26,7 @@ function get_preferred_from_update_core() { * Get available core updates * * @param array $options Set $options['dismissed'] to true to show dismissed upgrades too, - * set $options['available'] to false to skip not-dimissed updates. + * set $options['available'] to false to skip not-dismissed updates. * @return array Array of the update objects */ function get_core_updates( $options = array() ) { @@ -82,9 +82,6 @@ function find_core_update( $version, $locale ) { } function core_update_footer( $msg = '' ) { - if ( is_multisite() && !current_user_can('update_core') ) - return false; - if ( !current_user_can('update_core') ) return sprintf( __( 'Version %s' ), $GLOBALS['wp_version'] ); @@ -140,15 +137,13 @@ add_action( 'admin_notices', 'update_nag', 3 ); // Called directly from dashboard function update_right_now_message() { - if ( is_multisite() && !current_user_can('update_core') ) - return false; - - $cur = get_preferred_from_update_core(); - $msg = sprintf( __('You are using WordPress %s.'), $GLOBALS['wp_version'] ); - if ( isset( $cur->response ) && $cur->response == 'upgrade' && current_user_can('update_core') ) { - $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; + if ( current_user_can('update_core') ) { + $cur = get_preferred_from_update_core(); + + if ( isset( $cur->response ) && $cur->response == 'upgrade' ) + $msg .= " " . sprintf( __('Update to %s'), $cur->current ? $cur->current : __( 'Latest' ) ) . ''; } echo "$msg"; @@ -198,17 +193,18 @@ function wp_plugin_update_row( $file, $plugin_data ) { if ( is_network_admin() || !is_multisite() ) { echo '
'; + if ( ! current_user_can('update_plugins') ) printf( __('There is a new version of %1$s available. View version %4$s details.'), $plugin_name, esc_url($details_url), esc_attr($plugin_name), $r->new_version ); else if ( empty($r->package) ) printf( __('There is a new version of %1$s available. View version %4$s details. Automatic update 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 update 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 ); + do_action( "in_plugin_update_message-$file", $plugin_data, $r ); - echo '
'; + echo ''; + } } function wp_update_plugin($plugin, $feedback = '') {