26 entries in
'tripp' ), 'left bottom' => esc_html__( 'Left Bottom', 'tripp' ), 'right top' => esc_html__( 'Right Top', 'tripp' ), 'right center' => esc_html__( 'Right Center', 'tripp' ), 'right bottom' => esc_html__( 'Right Bottom', 'tripp' ), 'center top' => esc_html__( 'Center Top', 'tripp' ), '' => esc_html__( 'Center Center', 'tripp' ), 'center bottom' => esc_html__( 'Center Bottom', 'tripp' ), ), 'active_callback' => 'tripp_customizer_is_header_image_enabled', ) ); // Header -> Image Size. $wp_customize->add_setting( 'header_bg_size', array( 'default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_select', ) ); $wp_customize->add_control( 'header_bg_size', array( 'section' => 'header_image', 'label' => esc_html__( 'Image Size', 'tripp' ), 'description' => esc_html__( 'The header background image size.', 'tripp' ), 'type' => 'select', 'choices' => array( 'auto' => esc_html__( 'Original', 'tripp' ), 'contain' => esc_html__( 'Fit to Screen', 'tripp' ), '' => esc_html__( 'Fill Screen', 'tripp' ), ), 'active_callback' => 'tripp_customizer_is_header_image_enabled', ) ); // Header -> Fixed background. $wp_customize->add_setting( 'header_bg_attachment', array( 'default' => false, 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_checkbox', ) ); $wp_customize->add_control( 'header_bg_attachment', array( 'section' => 'header_image', 'label' => esc_html__( 'Fixed background.', 'tripp' ), 'type' => 'checkbox', 'active_callback' => 'tripp_customizer_is_header_image_enabled', ) ); // Header -> Repeated background. $wp_customize->add_setting( 'header_bg_repeat', array( 'default' => false, 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_checkbox', ) ); $wp_customize->add_control( 'header_bg_repeat', array( 'section' => 'header_image', 'label' => esc_html__( 'Repeated background.', 'tripp' ), 'type' => 'checkbox', 'active_callback' => 'tripp_customizer_is_header_image_enabled', ) ); // Header -> Background Overlay. $wp_customize->add_setting( 'header_bg_overlay', array( 'default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_select', ) ); $wp_customize->add_control( 'header_bg_overlay', array( 'section' => 'header_image', 'label' => esc_html__( 'Background Overlay', 'tripp' ), 'description' => esc_html__( 'Adds an overlay to the background image.', 'tripp' ), 'type' => 'select', 'choices' => array( '' => esc_html__( 'Gradient', 'tripp' ), 'color' => esc_html__( 'Color', 'tripp' ), ), 'active_callback' => 'tripp_customizer_is_header_image_enabled', ) ); // Header -> Overlay Color. $wp_customize->add_setting( 'header_bg_overlay_color', array( 'default' => '#000', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_bg_overlay_color', array( 'section' => 'header_image', 'label' => esc_html__( 'Overlay Color', 'tripp' ), 'description' => esc_html__( 'The color overlay for the header background image.', 'tripp' ), 'active_callback' => 'tripp_customizer_is_header_overlay_enabled', ) ) ); // Header -> Background Overlay Opacity. $wp_customize->add_setting( 'header_bg_overlay_opacity', array( 'default' => 75, 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_number', ) ); $wp_customize->add_control( new Tripp_Customize_Range_Control( $wp_customize, 'header_bg_overlay_opacity', array( 'section' => 'header_image', 'label' => esc_html__( 'Overlay Opacity', 'tripp' ), 'description' => esc_html__( 'The header background overlay opacity.', 'tripp' ), 'input_attrs' => array( 'min' => 0, 'max' => 100, ), 'marks' => array( 0 => 0, 25 => 25, 50 => 50, 75 => 75, 100 => 100, ), 'active_callback' => 'tripp_customizer_is_header_overlay_enabled', ) ) ); // Header -> Text Mode. $wp_customize->add_setting( 'header_text_mode', array( 'default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'tripp_customize_sanitize_select', ) ); $wp_customize->add_control( 'header_text_mode', array( 'section' => 'header_image', 'label' => esc_html__( 'Text Mode', 'tripp' ), 'description' => esc_html__( 'Text color for the header titles. Choose "Auto" to automatically adjust it depending on your site color scheme.', 'tripp' ), 'type' => 'select', 'choices' => array( '' => esc_html__( 'Auto', 'tripp' ), 'dark' => esc_html__( 'Dark', 'tripp' ), 'light' => esc_html__( 'Light', 'tripp' ), ), 'active_callback' => 'tripp_customizer_is_header_text_mode_enabled', ) ); } add_action( 'customize_register', 'tripp_customizer_register_header_settings', 20 );