mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 03:04:34 +00:00
Script Loader: Move the current_theme_supports() check above the wp_default_(scripts|styles) action, for consistency.
See #42804. git-svn-id: https://develop.svn.wordpress.org/trunk@46171 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -141,10 +141,6 @@ class WP_Scripts extends WP_Dependencies {
|
||||
public function __construct() {
|
||||
$this->init();
|
||||
add_action( 'init', array( $this, 'init' ), 0 );
|
||||
|
||||
if ( ! is_admin() && ! current_theme_supports( 'html5', 'script' ) ) {
|
||||
$this->type_attr = " type='text/javascript'";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -153,6 +149,10 @@ class WP_Scripts extends WP_Dependencies {
|
||||
* @since 3.4.0
|
||||
*/
|
||||
public function init() {
|
||||
if ( ! is_admin() && ! current_theme_supports( 'html5', 'script' ) ) {
|
||||
$this->type_attr = " type='text/javascript'";
|
||||
}
|
||||
|
||||
/**
|
||||
* Fires when the WP_Scripts instance is initialized.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user