WordPress.org

Make WordPress Core

Changeset 10238


Ignore:
Timestamp:
12/21/08 21:52:15 (5 years ago)
Author:
westi
Message:

Set the user-agent like we did before. See #8660

File:
1 edited

Legend:

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

    r10221 r10238  
    5050    $url = "http://api.wordpress.org/core/version-check/1.3/?version=$wp_version&php=$php_version&locale=$locale&mysql=$mysql_version&local_package=$local_package"; 
    5151 
    52     $options = array('timeout' => 3); 
     52    $options = array( 
     53        'timeout' => 3, 
     54        'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 
     55    ); 
    5356 
    5457    $response = wp_remote_get($url, $options); 
     
    146149 
    147150    $to_send = (object)compact('plugins', 'active'); 
    148     $body = array('plugins' => serialize( $to_send ) ); 
    149  
    150     $options = array('timeout' => 3, 'body' => $body); 
     151 
     152    $options = array( 
     153        'timeout' => 3, 
     154        'body' => array( 'plugins' => serialize( $to_send ) ), 
     155        'user-agent' => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 
     156    ); 
    151157 
    152158    $raw_response = wp_remote_post('http://api.wordpress.org/plugins/update-check/1.0/', $options); 
     
    219225    $options = array( 
    220226        'timeout'       => 3, 
    221         'body'          => array( 'themes' => serialize( $themes ) ) 
     227        'body'          => array( 'themes' => serialize( $themes ) ), 
     228        'user-agent'    => 'WordPress/' . $wp_version . '; ' . get_bloginfo( 'url' ) 
    222229    ); 
    223230 
Note: See TracChangeset for help on using the changeset viewer.