Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
function enqueue_scripts_and_styles() {
// Use this filter to limit where the scripts are enqueued.
$show = apply_filters( 'be_flex_slider_show_scripts', true );
if ( true === $show ) {
wp_enqueue_style( 'flex-slider', plugins_url( 'flexslider.css', __FILE__ ) );
wp_enqueue_script( 'jquery ');
wp_enqueue_script( 'flex-slider', plugins_url( 'jquery.flexslider-min.js', __FILE__ ), array( 'jquery' ) );
add_action( 'wp_head', array( $this, 'flex_slider_settings' ) );

I think since flex-slider has jquery listed as a dependancy you don't need to enqueue it before hand?


billerickson commented Feb 16, 2012

That might be true. I'll need to test it before I start doing it that way :)

This was to show someone in an email how to disable the flex slider scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment