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/admin-header.php

    r38307 r38459  
    1919 * @global WP_Locale $wp_locale
    2020 * @global string    $pagenow
    21  * @global string    $wp_version
    2221 * @global string    $update_title
    2322 * @global int       $total_update_count
    2423 * @global string    $parent_file
    2524 */
    26 global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow, $wp_version,
     25global $title, $hook_suffix, $current_screen, $wp_locale, $pagenow,
    2726    $update_title, $total_update_count, $parent_file;
    2827
     
    155154    $admin_body_class .= ' taxonomy-' . $current_screen->taxonomy;
    156155
    157 $admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( $wp_version ) );
    158 $admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', $wp_version ) );
     156$admin_body_class .= ' branch-' . str_replace( array( '.', ',' ), '-', floatval( get_bloginfo( 'version' ) ) );
     157$admin_body_class .= ' version-' . str_replace( '.', '-', preg_replace( '/^([.0-9]+).*/', '$1', get_bloginfo( 'version' ) ) );
    159158$admin_body_class .= ' admin-color-' . sanitize_html_class( get_user_option( 'admin_color' ), 'fresh' );
    160159$admin_body_class .= ' locale-' . sanitize_html_class( strtolower( str_replace( '_', '-', get_locale() ) ) );
Note: See TracChangeset for help on using the changeset viewer.