add_panel( 'bansta_misc_panel', [ 'title' => __( 'Misc', 'bansta' ), 'priority' => 102 ]); $wp_customize->add_section( 'bansta_hover', [ 'title' => __( 'Hover Styling', 'bansta' ), 'panel' => 'bansta_misc_panel' ]); $wp_customize->add_setting( 'menu_hover_styling', [ 'default' => $bansta_defaults['menu_hover_styling'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bansta_sanitize_select' ]); $wp_customize->add_control( 'menu_hover_styling', [ 'label' => __( 'Menu hover styling', 'bansta' ), 'section' => 'bansta_hover', 'settings' => 'menu_hover_styling', 'type' => 'select', 'choices' => [ 'none' => __( 'None', 'bansta' ), 'background' => __( 'Background styling', 'bansta' ), 'color' => __( 'Color styling', 'bansta' ), 'inline' => __( 'Inline styling', 'bansta' ) ] ]); $wp_customize->add_setting( 'bansta_hover_styling', [ 'default' => $bansta_defaults['bansta_hover_styling'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bansta_sanitize_select' ]); $wp_customize->add_control( 'bansta_hover_styling', [ 'label' => __( 'General Hover Styling', 'bansta' ), 'section' => 'bansta_hover', 'settings' => 'bansta_hover_styling', 'type' => 'select', 'choices' => [ 'none' => __( 'None', 'bansta' ), 'color' => __( 'Color styling', 'bansta' ), 'inline' => __( 'Inline styling', 'bansta' ) ] ]); $wp_customize->add_section( 'bansta_access_section', [ 'title' => __( 'Accessibility', 'bansta' ), 'panel' => 'bansta_misc_panel' ]); //Breadcrumbs $wp_customize->add_setting( 'breadcrumbs_option', [ 'default' => true, 'sanitize_callback' => 'bansta_sanitize_checkbox', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', ]); $wp_customize->add_control( new Ts_Toggle_Control( $wp_customize, 'breadcrumbs_option', [ 'label' => esc_html__('Breadcrumbs', 'bansta'), 'section' => 'bansta_access_section', 'settings' => 'breadcrumbs_option', 'type' => 'toggle' ])); //Back to the Top $wp_customize->add_setting( 'back_to_top', [ 'default' => true, 'sanitize_callback' => 'bansta_sanitize_checkbox', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', ]); $wp_customize->add_control( new Ts_Toggle_Control( $wp_customize, 'back_to_top', [ 'label' => esc_html__('Back-to-Top', 'bansta' ), 'section' => 'bansta_access_section', 'settings' => 'back_to_top', 'type' => 'toggle' ])); //Sticky header $wp_customize->add_setting( 'bansta_sticky_header', [ 'sanitize_callback' => 'bansta_sanitize_checkbox', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', ]); $wp_customize->add_control( new Ts_Toggle_Control( $wp_customize, 'bansta_sticky_header', [ 'label' => esc_html__('Enable Sticky header', 'bansta' ), 'section' => 'bansta_access_section', 'settings' => 'bansta_sticky_header', 'type' => 'toggle' ])); //Animation $wp_customize->add_setting( 'bansta_animation', [ 'sanitize_callback' => 'bansta_sanitize_checkbox', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', ]); $wp_customize->add_control( new Ts_Toggle_Control( $wp_customize, 'bansta_animation', [ 'label' => esc_html__('Animation Effect', 'bansta' ), 'section' => 'bansta_access_section', 'settings' => 'bansta_animation', 'type' => 'toggle' ])); $wp_customize->add_setting( 'bansta_scale', [ 'default' => $bansta_defaults['bansta_scale'], 'sanitize_callback' => 'bansta_sanitize_float', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'refresh' ]); $wp_customize->add_control( 'bansta_scale', [ 'label' => esc_html__( 'Scale image', 'bansta' ), 'section' => 'bansta_access_section', 'settings' => 'bansta_scale', 'type' => 'number', 'input_attrs' => [ 'min' => 0.5, 'max' => 2, 'step' => 0.1 ], 'active_callback' => fn() => get_theme_mod( 'bansta_animation', true ) ]); $wp_customize->add_setting( 'post_front_image_aspect_ratio', [ 'default' => $bansta_defaults['post_front_image_aspect_ratio'], 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'bansta_sanitize_select' ] ); $wp_customize->add_control( 'post_front_image_aspect_ratio', [ 'settings' => 'post_front_image_aspect_ratio', 'label' => esc_html__('Image aspect ratio', 'bansta'), 'section' => 'bansta_access_section', 'type' => 'select', 'active_callback' => fn() => get_theme_mod('post_front_hide_show_featured_image', true), 'choices' => [ 'auto' => esc_html__('auto', 'bansta'), '3 / 2' => esc_html__('3:2', 'bansta'), '2 / 3' => esc_html__('2:3', 'bansta'), '4 / 3' => esc_html__('4:3', 'bansta'), '3 / 4' => esc_html__('3:4', 'bansta'), '3.5 / 4' => esc_html__('3.5:4', 'bansta'), '16 / 9' => esc_html__('16:9', 'bansta'), ] ] );