refactor
This commit is contained in:
@@ -460,6 +460,7 @@ function twentytwentyfour_test1_assets() {
|
||||
|
||||
$landing_css_file = get_theme_file_path( 'assets/css/test1-landing.css' );
|
||||
$landing_js_file = get_theme_file_path( 'assets/js/test1-landing.js' );
|
||||
$landing_fonts_file = get_theme_file_path( 'assets/css/fonts-manrope.css' );
|
||||
|
||||
if ( $use_test1_assets ) {
|
||||
wp_dequeue_style( 'global-styles' );
|
||||
@@ -468,12 +469,14 @@ function twentytwentyfour_test1_assets() {
|
||||
wp_dequeue_style( 'classic-theme-styles' );
|
||||
}
|
||||
|
||||
wp_enqueue_style(
|
||||
'twentytwentyfour-test1-fonts',
|
||||
'https://fonts.googleapis.com/css2?family=Manrope:wght@400;700&display=swap',
|
||||
array(),
|
||||
null
|
||||
);
|
||||
if ( file_exists( $landing_fonts_file ) ) {
|
||||
wp_enqueue_style(
|
||||
'twentytwentyfour-test1-fonts',
|
||||
get_theme_file_uri( 'assets/css/fonts-manrope.css' ),
|
||||
array(),
|
||||
(string) filemtime( $landing_fonts_file )
|
||||
);
|
||||
}
|
||||
|
||||
if ( file_exists( $landing_css_file ) ) {
|
||||
wp_enqueue_style(
|
||||
@@ -787,13 +790,16 @@ function twentytwentyfour_test1_shared_shell_assets() {
|
||||
}
|
||||
|
||||
$shared_shell_css = get_theme_file_path( 'assets/css/test1-shared-shell.css' );
|
||||
$landing_fonts_file = get_theme_file_path( 'assets/css/fonts-manrope.css' );
|
||||
|
||||
wp_enqueue_style(
|
||||
'twentytwentyfour-test1-fonts',
|
||||
'https://fonts.googleapis.com/css2?family=Manrope:wght@400;700&display=swap',
|
||||
array(),
|
||||
null
|
||||
);
|
||||
if ( file_exists( $landing_fonts_file ) ) {
|
||||
wp_enqueue_style(
|
||||
'twentytwentyfour-test1-fonts',
|
||||
get_theme_file_uri( 'assets/css/fonts-manrope.css' ),
|
||||
array(),
|
||||
(string) filemtime( $landing_fonts_file )
|
||||
);
|
||||
}
|
||||
|
||||
if ( file_exists( $shared_shell_css ) ) {
|
||||
wp_enqueue_style(
|
||||
|
||||
Reference in New Issue
Block a user