refactor
This commit is contained in:
@@ -458,8 +458,8 @@ function twentytwentyfour_test1_assets() {
|
||||
return;
|
||||
}
|
||||
|
||||
$css_file = ABSPATH . 'index3.css';
|
||||
$js_file = ABSPATH . 'index3.js';
|
||||
$landing_css_file = get_theme_file_path( 'assets/css/test1-landing.css' );
|
||||
$landing_js_file = get_theme_file_path( 'assets/js/test1-landing.js' );
|
||||
|
||||
if ( $use_test1_assets ) {
|
||||
wp_dequeue_style( 'global-styles' );
|
||||
@@ -475,21 +475,21 @@ function twentytwentyfour_test1_assets() {
|
||||
null
|
||||
);
|
||||
|
||||
if ( file_exists( $css_file ) ) {
|
||||
if ( file_exists( $landing_css_file ) ) {
|
||||
wp_enqueue_style(
|
||||
'twentytwentyfour-test1-style',
|
||||
home_url( '/index3.css' ),
|
||||
get_theme_file_uri( 'assets/css/test1-landing.css' ),
|
||||
array( 'twentytwentyfour-test1-fonts' ),
|
||||
(string) filemtime( $css_file )
|
||||
(string) filemtime( $landing_css_file )
|
||||
);
|
||||
}
|
||||
|
||||
if ( ( is_front_page() || is_page( 'test1' ) ) && file_exists( $js_file ) ) {
|
||||
if ( ( is_front_page() || is_page( 'test1' ) ) && file_exists( $landing_js_file ) ) {
|
||||
wp_enqueue_script(
|
||||
'twentytwentyfour-test1-script',
|
||||
home_url( '/index3.js' ),
|
||||
get_theme_file_uri( 'assets/js/test1-landing.js' ),
|
||||
array(),
|
||||
(string) filemtime( $js_file ),
|
||||
(string) filemtime( $landing_js_file ),
|
||||
true
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user