Make WordPress Core


Ignore:
Timestamp:
09/18/2019 10:41:29 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Script Loader: Move the current_theme_supports() check above the wp_default_(scripts|styles) action, for consistency.

See #42804.

File:
1 edited

Legend:

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

    r46170 r46171  
    118118         */
    119119        public function __construct() {
     120                if ( ! is_admin() && ! current_theme_supports( 'html5', 'style' ) ) {
     121                        $this->type_attr = " type='text/css'";
     122                }
     123
    120124                /**
    121125                 * Fires when the WP_Styles instance is initialized.
    … …  
    126130                 */
    127131                do_action_ref_array( 'wp_default_styles', array( &$this ) );
    128 
    129                 if ( ! is_admin() && ! current_theme_supports( 'html5', 'style' ) ) {
    130                         $this->type_attr = " type='text/css'";
    131                 }
    132132        }
    133133
Note: See TracChangeset for help on using the changeset viewer.