Make WordPress Core


Ignore:
Timestamp:
09/18/2019 10:33:45 PM (7 years 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-styles.php

    r46164 r46170  
    127127        do_action_ref_array( 'wp_default_styles', array( &$this ) );
    128128
    129         if ( ! current_theme_supports( 'html5', 'style' ) ) {
     129        if ( ! is_admin() && ! current_theme_supports( 'html5', 'style' ) ) {
    130130            $this->type_attr = " type='text/css'";
    131131        }
Note: See TracChangeset for help on using the changeset viewer.