// to detect if the current browser is internet explorer.
global $is_IE,
$wp_scripts;
if ( $is_IE ) { // If IE 11 or below, use a flattened stylesheet with static values replacing CSS Variables.
wp_enqueue_style( 'twenty-twenty-one-style',
get_template_directory_uri() . '/assets/css/ie.css', array
(),
wp_get_theme()->
get( 'Version'
) );
} else { // If not IE, use the standard stylesheet.
wp_enqueue_style( 'twenty-twenty-one-style',
get_template_directory_uri() . '/style.css', array
(),
wp_get_theme()->
get( 'Version'
) );
} // RTL styles.
wp_style_add_data( 'twenty-twenty-one-style', 'rtl', 'replace'
);
// Print styles.
wp_enqueue_style( 'twenty-twenty-one-print-style',
get_template_directory_uri() . '/assets/css/print.css', array
(),
wp_get_theme()->
get( 'Version'
), 'print'
);
// Threaded comment reply styles.
if ( is_singular() &&
comments_open() &&
get_option( 'thread_comments'
) ) { wp_enqueue_script( 'comment-reply'
);
} // Register the IE11 polyfill file.
wp_register_script(