WordPress.org

Make WordPress Core

Changeset 14010


Ignore:
Timestamp:
04/05/10 20:19:07 (4 years ago)
Author:
josephscott
Message:

Update stats provided to api.wordpress.org see #12672

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/update.php

    r13687 r14010  
    4444    else 
    4545        $mysql_version = 'N/A'; 
     46 
     47    $num_blogs = 1; 
     48    $wp_install = home_url( '/' ); 
     49    $multisite_enabled = 0; 
     50    $user_count = count_users( ); 
     51    if ( is_multisite( ) ) { 
     52        $num_blogs = get_blog_count( ); 
     53        $wp_install = network_site_url( ); 
     54        $multisite_enabled = 1; 
     55    } 
     56 
    4657    $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"; 
     58    $url = "http://api.wordpress.org/core/version-check/1.5/?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"; 
    4859 
    4960    $options = array( 
    50         'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3), 
    51         'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 
     61        'timeout' => ( ( defined('DOING_CRON') && DOING_CRON ) ? 30 : 3 ), 
     62        'user-agent' => 'WordPress/' . $wp_version . '; ' . home_url( '/' ), 
     63        'headers' => array( 
     64            'wp_install' => $wp_install, 
     65            'wp_blog' => home_url( '/' ) 
     66        ) 
    5267    ); 
    5368 
Note: See TracChangeset for help on using the changeset viewer.