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-includes/class-wp-editor.php

    r38349 r38459  
    297297     * @static
    298298     *
    299      * @global string $wp_version
    300299     * @global string $tinymce_version
    301300     *
     
    304303     */
    305304    public static function editor_settings($editor_id, $set) {
    306         global $wp_version, $tinymce_version;
     305        global $tinymce_version;
    307306
    308307        if ( empty(self::$first_init) ) {
     
    560559
    561560                $suffix = SCRIPT_DEBUG ? '' : '.min';
    562                 $version = 'ver=' . $wp_version;
     561                $version = 'ver=' . get_bloginfo( 'version' );
    563562                $dashicons = includes_url( "css/dashicons$suffix.css?$version" );
    564563
     
    11321131     *
    11331132     * @static
    1134      * @global string $wp_version
    11351133     * @global string $tinymce_version
    11361134     * @global bool   $concatenate_scripts
     
    11381136     */
    11391137    public static function editor_js() {
    1140         global $wp_version, $tinymce_version, $concatenate_scripts, $compress_scripts;
     1138        global $tinymce_version, $concatenate_scripts, $compress_scripts;
    11411139
    11421140        /**
     
    12161214        $baseurl = self::$baseurl;
    12171215        // Load tinymce.js when running from /src, else load wp-tinymce.js.gz (production) or tinymce.min.js (SCRIPT_DEBUG)
    1218         $mce_suffix = false !== strpos( $wp_version, '-src' ) ? '' : '.min';
     1216        $mce_suffix = false !== strpos( get_bloginfo( 'version' ), '-src' ) ? '' : '.min';
    12191217
    12201218        if ( $tmce_on ) {
Note: See TracChangeset for help on using the changeset viewer.