]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-admin/includes/dashboard.php
WordPress 4.7.1-scripts
[autoinstalls/wordpress.git] / wp-admin / includes / dashboard.php
index e517f956c76161a2f77dbb1ce93ac03acbef902c..0ecf0a23f01106986038844fe1f49810fcfb7f70 100644 (file)
@@ -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() {
                <p>
                        <label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
                        <input type="search" name="s" value="" size="30" autocomplete="off" id="search-users"/>
-                       <?php submit_button( __( 'Search Users' ), 'button', false, false, array( 'id' => 'submit_users' ) ); ?>
+                       <?php submit_button( __( 'Search Users' ), '', false, false, array( 'id' => 'submit_users' ) ); ?>
                </p>
        </form>
 
@@ -435,7 +438,7 @@ function wp_network_dashboard_right_now() {
                <p>
                        <label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
                        <input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites"/>
-                       <?php submit_button( __( 'Search Sites' ), 'button', false, false, array( 'id' => 'submit_sites' ) ); ?>
+                       <?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
                </p>
        </form>
 <?php
@@ -777,7 +780,7 @@ function wp_dashboard_site_activity() {
 
        if ( !$future_posts && !$recent_posts && !$recent_comments ) {
                echo '<div class="no-activity">';
-               echo '<p class="smiley"></p>';
+               echo '<p class="smiley" aria-hidden="true"></p>';
                echo '<p>' . __( 'No activity yet!' ) . '</p>';
                echo '</div>';
        }
@@ -966,7 +969,7 @@ function wp_dashboard_rss_output( $widget_id ) {
  */
 function wp_dashboard_cached_rss_widget( $widget_id, $callback, $check_urls = array() ) {
        $loading = '<p class="widget-loading hide-if-no-js">' . __( 'Loading&#8230;' ) . '</p><p class="hide-if-js">' . __( 'This widget requires JavaScript.' ) . '</p>';
-       $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 .= "<p class='browser-update-nag{$browser_nag_class}'>{$msg}</p>";
 
                $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 );