From e484363f334d0a70c4dafcbf288a9c38ab59304a Mon Sep 17 00:00:00 2001 From: Holger Koenemann Date: Mon, 26 Jan 2015 14:57:33 +0100 Subject: [PATCH] 0.2.7 Adding theme customizer support for slider --- README.md | 3 +++ footer.php | 2 +- inc/customizer.php | 17 ++++++++++++++++- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 31b377d..1a40fcf 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,9 @@ Live Demo: http://holgerkoenemann.de/understrap/ Changelog = + - **0.2.7 Jan. 26th 2015** + - Adding some basic theme option for the build-in slider script + - **0.2.6 Dec. 28th 2014** - CLean up diff --git a/footer.php b/footer.php index e65e946..56082f1 100644 --- a/footer.php +++ b/footer.php @@ -39,7 +39,7 @@ var owl = jQuery('.owl-carousel'); owl.owlCarousel({ items:1, - loop:true, + loop:, autoplay:true, autoplayTimeout:, animateOut: 'fadeOut', diff --git a/inc/customizer.php b/inc/customizer.php index c9a41ae..c45a1be 100644 --- a/inc/customizer.php +++ b/inc/customizer.php @@ -29,11 +29,26 @@ function understrap_theme_customize_register( $wp_customize ) { ) ); $wp_customize->add_control( 'understrap_theme_slider_time', array( - 'label' => __( 'Slider Time', 'understrap' ), + 'label' => __( 'Slider Time (in ms)', 'understrap' ), 'section' => 'understrap_theme_slider_options', 'type' => 'text', 'settings' => 'understrap_theme_slider_time_setting' ) ); + + $wp_customize->add_setting( 'understrap_theme_slider_loop_setting', array( + 'default' => 'true' + ) ); + + $wp_customize->add_control( 'understrap_theme_loop', array( + 'label' => __( 'Loop Slider Content', 'understrap' ), + 'section' => 'understrap_theme_slider_options', + 'type' => 'radio', + 'choices' => array( + 'true' => 'yes', + 'false' => 'no', + ), + 'settings' => 'understrap_theme_slider_loop_setting' + ) ); } add_action( 'customize_register', 'understrap_theme_customize_register' );