diff --git a/src/wp-content/themes/twentytwentyfive/functions.php b/src/wp-content/themes/twentytwentyfive/functions.php index 42677f6923f5a..c97f11755b297 100644 --- a/src/wp-content/themes/twentytwentyfive/functions.php +++ b/src/wp-content/themes/twentytwentyfive/functions.php @@ -58,6 +58,11 @@ function twentytwentyfive_enqueue_styles() { array(), wp_get_theme()->get( 'Version' ) ); + wp_style_add_data( + 'twentytwentyfive-style', + 'path', + get_parent_theme_file_path( $src ) + ); } endif; add_action( 'wp_enqueue_scripts', 'twentytwentyfive_enqueue_styles' ); diff --git a/src/wp-content/themes/twentytwentytwo/functions.php b/src/wp-content/themes/twentytwentytwo/functions.php index 9abf96f0fee88..92d3003b256bb 100644 --- a/src/wp-content/themes/twentytwentytwo/functions.php +++ b/src/wp-content/themes/twentytwentytwo/functions.php @@ -49,15 +49,17 @@ function twentytwentytwo_styles() { $suffix = SCRIPT_DEBUG ? '' : '.min'; $src = 'style' . $suffix . '.css'; - wp_register_style( + wp_enqueue_style( 'twentytwentytwo-style', get_parent_theme_file_uri( $src ), array(), $version_string ); - - // Enqueue theme stylesheet. - wp_enqueue_style( 'twentytwentytwo-style' ); + wp_style_add_data( + 'twentytwentytwo-style', + 'path', + get_parent_theme_file_path( $src ) + ); } endif;