Skip to content

Commit

Permalink
added option to enable automatic slideshow animation of featured posts
Browse files Browse the repository at this point in the history
  • Loading branch information
raeffs committed Sep 6, 2015
1 parent 81bd5dc commit 1010e45
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
19 changes: 19 additions & 0 deletions functions/theme-options.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions inc/featured.php
Original file line number Diff line number Diff line change
Expand Up @@ -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: <?php if (ot_get_option('featured-slideshow') == 'on') { echo 'true'; } else { echo 'false'; } ?>,
slideshowSpeed: <?php echo ot_get_option('featured-slideshow-speed', 5000); ?>,
});

}
Expand Down

0 comments on commit 1010e45

Please sign in to comment.