1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
if (is_page()) {

	if (isset($meta['slider']) && $meta['slider'] == "Carousel") { 
	wp_enqueue_script( 'backstretch', $script_folder . 'jquery.backstretch.min.js', 'jquery');
	wp_enqueue_script( 'carouseljs', $carousel_folder . 'caroufred.js', 'jquery');
	wp_localize_script('carouseljs','car',
	array(
		'carousel_auto' => $meta['carousel_auto'],
		'carousel_background' => $meta['carousel_background'],
		'carousel_items' => $meta['carousel_items'],
		'carousel_circular' => $meta['carousel_circular'],
		'carousel_infinite' => $meta['carousel_infinite'],
		'carousel_pause' => $meta['carousel_pause'],
		'carousel_navigation' => $meta['carousel_navigation'],
		'carousel_transition' => $meta['carousel_transition'],
		'carousel_easing' => $meta['carousel_easing'],
		'carousel_duration' => $meta['carousel_duration']
	)
	);
}