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/class-wp-press-this.php

    r38397 r38459  
    268268     */
    269269    public function fetch_source_html( $url ) {
    270         global $wp_version;
    271 
    272270        if ( empty( $url ) ) {
    273271            return new WP_Error( 'invalid-url', __( 'A valid URL was not provided.' ) );
     
    277275            'timeout' => 30,
    278276            // Use an explicit user-agent for Press This
    279             'user-agent' => 'Press This (WordPress/' . $wp_version . '); ' . get_bloginfo( 'url' )
     277            'user-agent' => 'Press This (WordPress/' . get_bloginfo( 'version' ) . '); ' . get_bloginfo( 'url' )
    280278        ) );
    281279
     
    11901188     *
    11911189     * @global WP_Locale $wp_locale
    1192      * @global string    $wp_version
    11931190     * @global bool      $is_IE
    11941191     */
    11951192    public function html() {
    1196         global $wp_locale, $wp_version;
     1193        global $wp_locale;
     1194
     1195        $wp_version = get_bloginfo( 'version' );
    11971196
    11981197        // Get data, new (POST) and old (GET).
Note: See TracChangeset for help on using the changeset viewer.