Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function xs_hook_js() {
- $slideshow = '';
- $slides = xs_get_option('theme_options', 'main_slider');
- if (is_array($slides)) {
- foreach ($slides as $arr) {
- $slideshow .= "'" . $arr['img_src'] . "',";
- }
- }
- trim($slideshow, ",");
- $output = "
- /* ================================ BACKGROUND SLIDESHOW =================================== */
- jQuery(document).ready(function($) {
- $.backstretch([
- // you can additional images in here with comma separated values
- " . $slideshow . "
- ], {
- fade: " . xs_get_option('theme_options', 'fading_speed') . ",
- duration: " . xs_get_option('theme_options', 'animation_pause') . "
- });
- });";
- echo "<script>$output</script>";
- }
- add_action('wp_footer', 'xs_hook_js', 99);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement