WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/18/2019 10:33:45 PM (10 months ago)
Author:
SergeyBiryukov
Message:

Script Loader: Only check current theme's HTML5 support for scripts and styles on front end.

Avoids a fatal error in the admin if SCRIPT_DEBUG is disabled.

Props azaozz.
See #42804.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class.wp-scripts.php

    r46164 r46170  
    143143        add_action( 'init', array( $this, 'init' ), 0 );
    144144
    145         if ( ! current_theme_supports( 'html5', 'script' ) ) {
     145        if ( ! is_admin() && ! current_theme_supports( 'html5', 'script' ) ) {
    146146            $this->type_attr = " type='text/javascript'";
    147147        }
Note: See TracChangeset for help on using the changeset viewer.