mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 11:14:36 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@46170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -142,7 +142,7 @@ class WP_Scripts extends WP_Dependencies {
|
||||
$this->init();
|
||||
add_action( 'init', array( $this, 'init' ), 0 );
|
||||
|
||||
if ( ! current_theme_supports( 'html5', 'script' ) ) {
|
||||
if ( ! is_admin() && ! current_theme_supports( 'html5', 'script' ) ) {
|
||||
$this->type_attr = " type='text/javascript'";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user