This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: A little JS load confusion?

Jason Bobich

I think the error on my part is that there’s no need for flexslider and roundabout to be in that $deps array at all. There functions are not called anywhere within the framework scripts, and so their sequence is irrelevant unless you were doing something specifically with flexslider or roundabout. I’ll remove these in the next update.

Like a hint one is supposed to do this, replace entire function if not happy with defaults.

If you wanted to change the $deps, you wouldn’t need to replace the entire function. You could just filter the array.

function my_framework_scripts( $scripts ){
	$scripts = array( 'jquery', 'bootstrap', 'prettyphoto', 'superfish', 'themeblvd' );
	return $scripts;
add_filter('themeblvd_framework_scripts', 'my_framework_scripts');

And if you’re wanting to remove certain scripts you could de-register them from your own function, as well.