Created
February 16, 2012 16:26
-
-
Save billerickson/1846221 to your computer and use it in GitHub Desktop.
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
<?php | |
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' ) ); | |
} | |
} |
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
I think since flex-slider has jquery listed as a dependancy you don't need to enqueue it before hand?