From 1010e45e786cddd39c2bdff5dcf65b3b52452b96 Mon Sep 17 00:00:00 2001 From: Raphael Fleischlin Date: Sun, 6 Sep 2015 14:57:00 +0200 Subject: [PATCH] added option to enable automatic slideshow animation of featured posts --- functions/theme-options.php | 19 +++++++++++++++++++ inc/featured.php | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/functions/theme-options.php b/functions/theme-options.php index 93d4a5ff..a70eaaf0 100644 --- a/functions/theme-options.php +++ b/functions/theme-options.php @@ -215,6 +215,25 @@ function custom_theme_options() { 'section' => 'blog', 'min_max_step' => '0,10,1' ), + // Blog: Featured Slideshow + array( + 'id' => 'featured-slideshow', + 'label' => 'Featured Slideshow', + 'desc' => 'Enable slideshow of featured posts (automatic animation)', + 'std' => 'off', + 'type' => 'on-off', + 'section' => 'blog' + ), + // Blog: Featured Slideshow Speed + array( + 'id' => 'featured-slideshow-speed', + 'label' => 'Featured Slideshow Speed', + 'desc' => 'Speed of the automatic slideshow animation', + 'std' => '5000', + 'type' => 'numeric-slider', + 'section' => 'blog', + 'min_max_step' => '1000,10000,1000' + ), // Blog: Standard array( 'id' => 'blog-standard', diff --git a/inc/featured.php b/inc/featured.php index b5b6ef12..c111fe7c 100644 --- a/inc/featured.php +++ b/inc/featured.php @@ -34,14 +34,14 @@ jQuery('#flexslider-featured').flexslider({ animation: "slide", useCSS: false, // Fix iPad flickering issue - slideshow: false, directionNav: true, controlNav: true, pauseOnHover: true, - slideshowSpeed: 7000, animationSpeed: 400, smoothHeight: true, - touch: false + touch: false, + slideshow: , + slideshowSpeed: , }); }