WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/31/2016 05:48:49 AM (3 years ago)
Author:
wonderboymusic
Message:

General: use get_bloginfo( 'version' ) instead of global $wp_version in several locations - excluding those locations which reload version.php mid-flight.

See #37699.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/credits.php

    r36069 r38459  
    1111 * Retrieve the contributor credits.
    1212 *
    13  * @global string $wp_version The current WordPress version.
    14  *
    1513 * @since 3.2.0
    1614 *
     
    1816 */
    1917function wp_credits() {
    20     global $wp_version;
     18    $wp_version = get_bloginfo( 'version' );
    2119    $locale = get_locale();
    2220
     
    2725        || ( isset( $results['data']['version'] ) && strpos( $wp_version, $results['data']['version'] ) !== 0 )
    2826    ) {
    29         $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version=$wp_version&locale=$locale" );
     27        $response = wp_remote_get( "http://api.wordpress.org/core/credits/1.1/?version={$wp_version}&locale={$locale}" );
    3028
    3129        if ( is_wp_error( $response ) || 200 != wp_remote_retrieve_response_code( $response ) )
Note: See TracChangeset for help on using the changeset viewer.