Created
August 15, 2017 10:29
-
-
Save jonathan-kosgei/5eb84520dc109087553d7b38eb4d2fdd to your computer and use it in GitHub Desktop.
Wordpress enqueue scripts
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
function ensure_select2() { | |
wp_enqueue_style( 'select2', plugin_dir_url( __FILE__ ) . 'assets/css/select2.min.css' ); | |
wp_enqueue_script( 'select2', plugin_dir_url( __FILE__ ) . 'assets/js/select2.js', array(), '1.0.0', true ); | |
} | |
add_action( 'admin_head' , 'ensure_select2' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment