Make WordPress Core

Ticket #12672: wp-includes--update.php.diff

File wp-includes--update.php.diff, 1.5 KB (added by josephscott, 15 years ago)
  • wp-includes/update.php

     
    4343                $mysql_version = preg_replace('/[^0-9.].*/', '', $wpdb->db_version());
    4444        else
    4545                $mysql_version = 'N/A';
     46
     47        $num_blogs = 1;
     48        $wp_install = get_bloginfo( 'url' ) . '/';
     49        $multisite_enabled = 0;
     50        if ( is_multisite( ) ) {
     51                $num_blogs = get_blog_count( );
     52                $wp_install = 'http://' . DOMAIN_CURRENT_SITE . PATH_CURRENT_SITE;
     53                $multisite_enabled = 1;
     54        }
     55
     56        $user_count = count_users( );
     57
    4658        $local_package = isset( $wp_local_package )? $wp_local_package : '';
    47         $url = "http://api.wordpress.org/core/version-check/1.4/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package";
     59        $url = "http://api.wordpress.org/core/version-check/1.4/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package&blogs=$num_blogs&users={$user_count['total_users']}&multisite_enabled=$multisite_enabled";
    4860
    4961        $options = array(
    5062                'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3),
    51                 'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' )
     63                'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ),
     64                'headers' => array(
     65                        'wp_install' => $wp_install,
     66                        'wp_blog' => get_bloginfo( 'url' ) . '/'
     67                )
    5268        );
    5369
    5470        $response = wp_remote_get($url, $options);