Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Wordpress enqueue scripts
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
You can’t perform that action at this time.