diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 60d94a3a0648f..4ac143a918615 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -2969,8 +2969,8 @@ function wp_get_inline_script_tag( $data, $attributes = array() ) { * @see https://www.w3.org/TR/xhtml1/#h-4.8 */ if ( - ! current_theme_supports( 'html5', 'script' ) && - ( + ( ! current_theme_supports( 'html5', 'script' ) && ! is_admin() ) + && ( ! isset( $attributes['type'] ) || 'module' === $attributes['type'] || str_contains( $attributes['type'], 'javascript' ) ||