add_setting( 'bc_featured_image' , array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'bc_featured_image', array( 'label' => __( 'Featured Image', 'broadcast-lite' ), 'description' => __( 'This image should be large, 1920x1080 works great.', 'broadcast-lite'), 'section' => 'bc_featured_image_settings', 'settings' => 'bc_featured_image', ) ) ); // END SETTING // SETTING - bc_featured_image_height $wp_customize->add_setting( 'bc_featured_image_height' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', 'default' => 'default' ) ); $wp_customize->add_control( 'bc_featured_image_height', array( 'label' => __( 'Featured Image Height', 'broadcast-lite' ), 'description' => __( 'Change the height settings of your featured image.', 'broadcast-lite'), 'type' => 'radio', 'choices' => array( 'default' => 'Default', 'max-height' => 'Max Height (no taller than your screen)', 'half-height' => 'Half Height (about half the height of your screen)' ), 'section' => 'bc_featured_image_settings', 'settings' => 'bc_featured_image_height', ) ); // END SETTING // SETTING - bc_featured_image_effects $wp_customize->add_setting( 'bc_featured_image_effects' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', 'default' => 'vignette' ) ); $wp_customize->add_control( 'bc_featured_image_effects', array( 'label' => __( 'Featured Image Effects', 'broadcast-lite' ), 'description' => __( 'Add a cool overlay on top of your featured image.', 'broadcast-lite'), 'type' => 'radio', 'choices' => array( 'vignette' => 'Vignette', 'grid' => 'Grid', 'pixelation' => 'Pixelation', 'dots' => 'Dots', 'blood' => 'Blood', 'stars' => 'Stars', 'custom' => 'Custom', ), 'section' => 'bc_featured_image_settings', 'settings' => 'bc_featured_image_effects', ) ); // END SETTING // SETTING - bc_schedule_check $wp_customize->add_setting( 'bc_featured_video_check' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_checkbox', ) ); $wp_customize->add_control( 'bc_featured_video_check', array( 'label' => __( 'Activate Masthead Video', 'broadcast-lite' ), 'description' => __( 'Check this box if you would like to use a YouTube video in the masthead area.', 'broadcast-lite'), 'section' => 'bc_featured_video_settings', 'settings' => 'bc_featured_video_check', 'type' => 'checkbox', ) ); // END SETTING // SETTING - bc_featured_video_url $wp_customize->add_setting( 'bc_featured_video_url' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bc_featured_video_url', array( 'label' => __( 'Video URL', 'broadcast-lite' ), 'description' => __( 'Add YouTube video ID. This is the code in the URL that comes after ?v=', 'broadcast-lite'), 'type' => 'text', 'section' => 'bc_featured_video_settings', 'settings' => 'bc_featured_video_url', ) ); // END SETTING // SETTING - bc_featured_video_zoom $wp_customize->add_setting( 'bc_featured_video_zoom' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'bc_featured_video_zoom', array( 'label' => __( 'Video Zoom Level', 'broadcast-lite' ), 'description' => __( 'Adjust the zoom value of the video to remove black bars. 1.4 works well.', 'broadcast-lite'), 'type' => 'number', 'input_attrs' => array( 'min' => 1, 'max' => 2, 'step' => 0.1 ), 'section' => 'bc_featured_video_settings', 'settings' => 'bc_featured_video_zoom', ) ); // END SETTING // SETTING - bc_featured_video_height $wp_customize->add_setting( 'bc_featured_video_height' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', 'default' => 'default' ) ); $wp_customize->add_control( 'bc_featured_video_height', array( 'label' => __( 'Featured Video Height', 'broadcast-lite' ), 'description' => __( 'Change the height settings of your featured video.', 'broadcast-lite'), 'type' => 'radio', 'choices' => array( 'default' => 'Default', 'half-height' => 'Half Height (about half the height of your screen)' ), 'section' => 'bc_featured_video_settings', 'settings' => 'bc_featured_video_height', ) ); // END SETTING // SETTING - bc_colour_theme $wp_customize->add_setting( 'bc_featured_image_effects_custom' , array( 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_textarea_field' ) ); $wp_customize->add_control( 'bc_featured_image_effects_custom', array( 'label' => __( '(Advanced) Custom Overlay', 'broadcast-lite' ), 'description' => __( 'If you\'d like to use a custom overlay, you can add it here. Learn more about custom overlays here.', 'broadcast-lite'), 'section' => 'bc_featured_image_settings', 'settings' => 'bc_featured_image_effects_custom', 'type' => 'textarea', ) ); // END SETTING } add_action( 'customize_register', 'broadcast_customize_masthead_settings' );