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/dashboard.php

    r38448 r38459  
    13941394 * @since 3.2.0
    13951395 *
    1396  * @global string $wp_version
    1397  *
    13981396 * @return array|bool False on failure, array of browser data on success.
    13991397 */
     
    14051403
    14061404    if ( false === ($response = get_site_transient('browser_' . $key) ) ) {
    1407         global $wp_version;
    1408 
    14091405        $options = array(
    14101406            'body'          => array( 'useragent' => $_SERVER['HTTP_USER_AGENT'] ),
    1411             'user-agent'    => 'WordPress/' . $wp_version . '; ' . home_url()
     1407            'user-agent'    => 'WordPress/' . get_bloginfo( 'version' ) . '; ' . home_url()
    14121408        );
    14131409
Note: See TracChangeset for help on using the changeset viewer.