WordPress.org

Make WordPress Core

Ticket #28557: 28557.diff

File 28557.diff, 1.1 KB (added by Kau-Boy, 5 years ago)
  • src/wp-includes/script-loader.php

    diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php
    index 15c1dd0..e02e395 100644
    a b function wp_default_scripts( &$scripts ) { 
    6363
    6464        $scripts->base_url = $guessurl;
    6565        $scripts->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
    66         $scripts->default_version = get_bloginfo( 'version' );
     66        $scripts->default_version = defined( 'WINDIR' ) ? get_bloginfo( 'version' ) : filemtime( WP_CONTENT_DIR );
    6767        $scripts->default_dirs = array('/wp-admin/js/', '/wp-includes/js/');
    6868
    6969        $suffix = SCRIPT_DEBUG ? '' : '.min';
    function wp_default_styles( &$styles ) { 
    574574
    575575        $styles->base_url = $guessurl;
    576576        $styles->content_url = defined('WP_CONTENT_URL')? WP_CONTENT_URL : '';
    577         $styles->default_version = get_bloginfo( 'version' );
     577        $styles->default_version = defined( 'WINDIR' ) ? get_bloginfo( 'version' ) : filemtime( WP_CONTENT_DIR );
    578578        $styles->text_direction = function_exists( 'is_rtl' ) && is_rtl() ? 'rtl' : 'ltr';
    579579        $styles->default_dirs = array('/wp-admin/', '/wp-includes/css/');
    580580