Save
This commit is contained in:
@@ -286,4 +286,21 @@ add_action( 'wp_enqueue_scripts', function() {
|
||||
);
|
||||
}
|
||||
|
||||
}, PHP_INT_MAX );
|
||||
|
||||
add_action( 'wp_enqueue_scripts', function() {
|
||||
|
||||
$file_path = get_stylesheet_directory() . '/assets/js/custom.js';
|
||||
$file_url = get_stylesheet_directory_uri() . '/assets/js/custom.js';
|
||||
|
||||
if ( file_exists( $file_path ) ) {
|
||||
wp_enqueue_script(
|
||||
'hello-custom-js',
|
||||
$file_url,
|
||||
array('jquery'),
|
||||
filemtime( $file_path ),
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
}, PHP_INT_MAX );
|
||||
Reference in New Issue
Block a user