diff --git a/inc/functions.php b/inc/functions.php index f0e5f66..608aad0 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -115,7 +115,12 @@ function accelerate_scripts_styles_method() { // wp_enqueue_style( 'accelerate-fontawesome', get_template_directory_uri() . '/fontawesome/css/font-awesome.css', array(), '4.7.0' ); wp_enqueue_script( 'html5shiv', ACCELERATE_JS_URL . '/html5shiv.js', array(), '3.7.3', false ); - wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ); + + // The 'conditional' data key is deprecated since WP 6.9.0 and has no effect there; + // only set it on older versions to keep html5shiv restricted to IE8 and below. + if ( version_compare( $GLOBALS['wp_version'], '6.9', '<' ) ) { + wp_script_add_data( 'html5shiv', 'conditional', 'lte IE 8' ); + } } function accelerate_block_editor_styles() {