3 * Customizer functionality for the Video Section.
6 * @subpackage Shop Isle
10 * Hook controls for Video Section to Customizer.
12 function shop_isle_video_controls_customize_register( $wp_customize ) {
16 $wp_customize->add_section(
17 'shop_isle_video_section', array(
18 'title' => __( 'Video section', 'shop-isle' ),
19 'priority' => apply_filters( 'shop_isle_section_priority', 25, 'shop_isle_video_section' ),
24 $wp_customize->add_setting(
25 'shop_isle_video_hide', array(
27 'transport' => 'postMessage',
28 'sanitize_callback' => 'shop_isle_sanitize_checkbox',
32 $wp_customize->add_control(
33 'shop_isle_video_hide', array(
35 'label' => __( 'Hide video section?', 'shop-isle' ),
36 'section' => 'shop_isle_video_section',
42 $wp_customize->add_setting(
43 'shop_isle_video_title', array(
44 'sanitize_callback' => 'shop_isle_sanitize_text',
45 'transport' => 'postMessage',
49 $wp_customize->add_control(
50 'shop_isle_video_title', array(
51 'label' => __( 'Title', 'shop-isle' ),
52 'section' => 'shop_isle_video_section',
58 $wp_customize->add_setting(
59 'shop_isle_yt_link', array(
60 'sanitize_callback' => 'esc_url',
64 $wp_customize->add_control(
65 'shop_isle_yt_link', array(
66 'label' => __( 'Youtube link', 'shop-isle' ),
67 'section' => 'shop_isle_video_section',
73 $wp_customize->add_setting(
74 'shop_isle_yt_thumbnail', array(
75 'sanitize_callback' => 'esc_url',
79 $wp_customize->add_control(
80 new WP_Customize_Image_Control(
81 $wp_customize, 'shop_isle_yt_thumbnail', array(
82 'label' => __( 'Video thumbnail', 'shop-isle' ),
83 'section' => 'shop_isle_video_section',
89 $wp_customize->get_section( 'shop_isle_video_section' )->panel = 'shop_isle_front_page_sections';
93 add_action( 'customize_register', 'shop_isle_video_controls_customize_register' );