0.2.7 Adding theme customizer support for slider
This commit is contained in:
parent
002665d98f
commit
e484363f33
|
@ -5,6 +5,9 @@ Live Demo: http://holgerkoenemann.de/understrap/
|
||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
=
|
=
|
||||||
|
- **0.2.7 Jan. 26th 2015**
|
||||||
|
- Adding some basic theme option for the build-in slider script
|
||||||
|
|
||||||
- **0.2.6 Dec. 28th 2014**
|
- **0.2.6 Dec. 28th 2014**
|
||||||
- CLean up
|
- CLean up
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
var owl = jQuery('.owl-carousel');
|
var owl = jQuery('.owl-carousel');
|
||||||
owl.owlCarousel({
|
owl.owlCarousel({
|
||||||
items:1,
|
items:1,
|
||||||
loop:true,
|
loop:<?php echo get_theme_mod( 'understrap_theme_slider_loop_setting' );?>,
|
||||||
autoplay:true,
|
autoplay:true,
|
||||||
autoplayTimeout:<?php echo get_theme_mod( 'understrap_theme_slider_time_setting' );?>,
|
autoplayTimeout:<?php echo get_theme_mod( 'understrap_theme_slider_time_setting' );?>,
|
||||||
animateOut: 'fadeOut',
|
animateOut: 'fadeOut',
|
||||||
|
|
|
@ -29,11 +29,26 @@ function understrap_theme_customize_register( $wp_customize ) {
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$wp_customize->add_control( 'understrap_theme_slider_time', array(
|
$wp_customize->add_control( 'understrap_theme_slider_time', array(
|
||||||
'label' => __( 'Slider Time', 'understrap' ),
|
'label' => __( 'Slider Time (in ms)', 'understrap' ),
|
||||||
'section' => 'understrap_theme_slider_options',
|
'section' => 'understrap_theme_slider_options',
|
||||||
'type' => 'text',
|
'type' => 'text',
|
||||||
'settings' => 'understrap_theme_slider_time_setting'
|
'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' );
|
add_action( 'customize_register', 'understrap_theme_customize_register' );
|
||||||
|
|
||||||
|
|
Reference in New Issue