X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/b22765f41bf0b2021b9beb9120ee0ac91fa89292..e3ff8f35458a959c1879c0a4976701ed8dcfe651:/wp-admin/includes/dashboard.php diff --git a/wp-admin/includes/dashboard.php b/wp-admin/includes/dashboard.php index e517f956..0ecf0a23 100644 --- a/wp-admin/includes/dashboard.php +++ b/wp-admin/includes/dashboard.php @@ -392,9 +392,12 @@ function wp_network_dashboard_right_now() { $c_users = get_user_count(); $c_blogs = get_blog_count(); + /* translators: 1: Number of users on the network */ $user_text = sprintf( _n( '%s user', '%s users', $c_users ), number_format_i18n( $c_users ) ); + /* translators: 1: Number of sites on the network */ $blog_text = sprintf( _n( '%s site', '%s sites', $c_blogs ), number_format_i18n( $c_blogs ) ); + /* translators: 1: Text indicating the number of sites on the network, 2: Text indicating the number of users on the network */ $sentence = sprintf( __( 'You have %1$s and %2$s.' ), $blog_text, $user_text ); if ( $actions ) { @@ -427,7 +430,7 @@ function wp_network_dashboard_right_now() {

- 'submit_users' ) ); ?> + 'submit_users' ) ); ?>

@@ -435,7 +438,7 @@ function wp_network_dashboard_right_now() {

- 'submit_sites' ) ); ?> + 'submit_sites' ) ); ?>

'; - echo '

'; + echo ''; echo '

' . __( 'No activity yet!' ) . '

'; echo ''; } @@ -966,7 +969,7 @@ function wp_dashboard_rss_output( $widget_id ) { */ function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) { $loading = '

' . __( 'Loading…' ) . '

' . __( 'This widget requires JavaScript.' ) . '

'; - $doing_ajax = ( defined('DOING_AJAX') && DOING_AJAX ); + $doing_ajax = wp_doing_ajax(); if ( empty($check_urls) ) { $widgets = get_option( 'dashboard_widget_options' ); @@ -1149,7 +1152,7 @@ function wp_dashboard_primary() { ) ); - if ( ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) { + if ( ( ! defined( 'DISALLOW_FILE_MODS' ) || ! DISALLOW_FILE_MODS ) && ( ! is_multisite() && is_blog_admin() && current_user_can( 'install_plugins' ) ) || ( is_network_admin() && current_user_can( 'manage_network_plugins' ) && current_user_can( 'install_plugins' ) ) ) { $feeds['plugins'] = array( 'link' => '', 'url' => array( @@ -1353,7 +1356,7 @@ function wp_dashboard_browser_nag() { $notice .= "

{$msg}

"; $browsehappy = 'http://browsehappy.com/'; - $locale = get_locale(); + $locale = get_user_locale(); if ( 'en_US' !== $locale ) $browsehappy = add_query_arg( 'locale', $locale, $browsehappy ); @@ -1393,8 +1396,6 @@ function dashboard_browser_nag_class( $classes ) { * * @since 3.2.0 * - * @global string $wp_version - * * @return array|bool False on failure, array of browser data on success. */ function wp_check_browser_version() { @@ -1404,11 +1405,9 @@ function wp_check_browser_version() { $key = md5( $_SERVER['HTTP_USER_AGENT'] ); if ( false === ($response = get_site_transient('browser_' . $key) ) ) { - global $wp_version; - $options = array( 'body' => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ), - 'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url() + 'user-agent' => 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url() ); $response = wp_remote_post( 'http://api.wordpress.org/core/browse-happy/1.1/', $options );