Created
March 10, 2021 18:19
-
-
Save Edwardtonnn/f68f0847a8c138854c6f77a296217dff to your computer and use it in GitHub Desktop.
Adding Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Enqueue Glide.js scripts and styles. | |
*/ | |
function glide_js_scripts_styles() { | |
wp_enqueue_style( 'glide-core', get_theme_file_uri( '/glide/glide.min.css' ), array(), filemtime( get_theme_file_path( '/glide/glide.min.css' ) ) ); | |
wp_enqueue_style( 'glide-theme', get_theme_file_uri( '/glide/glide.theme.css' ), array(), filemtime( get_theme_file_path( '/glide/glide.theme.css' ) ) ); | |
wp_enqueue_script( 'glide', get_theme_file_uri( '/glide/glide.min.js' ), array(), filemtime( get_theme_file_path( '/glide/glide.min.js' ) ), true ); | |
wp_enqueue_script( 'my-glide', get_theme_file_uri( '/glide/my.glide.js' ), array('jquery'), filemtime( get_theme_file_path( '/glide/my.glide.js' ) ), true ); | |
} | |
add_action( 'wp_enqueue_scripts', 'glide_js_scripts_styles', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment