Script Loader: Add function_exists() checks for is_admin() and current_theme_supports(), to accomodate for using WP_Dependencies as a standalone class.
Remove `<![CDATA[` when outputting HTML5 script tags. Props azaozz. Fixes #42804. Built from https://develop.svn.wordpress.org/trunk@46287 git-svn-id: http://core.svn.wordpress.org/trunk@46099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -117,7 +117,11 @@ class WP_Styles extends WP_Dependencies {
|
||||
* @since 2.6.0
|
||||
*/
|
||||
public function __construct() {
|
||||
if ( ! is_admin() && ! current_theme_supports( 'html5', 'style' ) ) {
|
||||
if (
|
||||
function_exists( 'is_admin' ) && ! is_admin()
|
||||
&&
|
||||
function_exists( 'current_theme_supports' ) && ! current_theme_supports( 'html5', 'style' )
|
||||
) {
|
||||
$this->type_attr = " type='text/css'";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user