add_section( 'aces_topbar_layout_section', array( 'title' => esc_html__( 'Layout', 'aces' ), 'priority' => 10, 'panel' => $panel, ) ); $wp_customize->add_setting( 'aces_topbar_enable', array( 'default' => false, 'sanitize_callback' => 'aces_sanitize_checkbox', ) ); $wp_customize->add_control( new WP_Customize_Control( $wp_customize, 'aces_topbar_enable', array( 'label' => esc_html__( 'Enable Topbar', 'aces' ), 'type' => 'checkbox', 'section' => 'aces_topbar_layout_section', 'settings' => 'aces_topbar_enable', 'priority' => 10, ) ) ); $wp_customize->add_setting( 'aces_theme_topbar_bg_color', array( 'transport' => 'postMessage', 'default' => '#fff', 'sanitize_callback' => 'aces_sanitize_color', ) ); $wp_customize->add_control( new Aces_Customizer_Color_Control( $wp_customize, 'aces_theme_topbar_bg_color', array( 'label' => esc_html__( 'Background Color', 'aces' ), 'section' => 'aces_topbar_layout_section', 'settings' => 'aces_theme_topbar_bg_color', 'priority' => 10, 'active_callback' => 'aces_topbar_enable', ) ) ); $wp_customize->add_setting( 'aces_topbar_border_color', array( 'transport' => 'postMessage', 'default' => '#ebebeb ', 'sanitize_callback' => 'aces_sanitize_color', ) ); $wp_customize->add_control( new Aces_Customizer_Color_Control( $wp_customize, 'aces_topbar_border_color', array( 'label' => esc_html__( 'Border Color', 'aces' ), 'section' => 'aces_topbar_layout_section', 'settings' => 'aces_topbar_border_color', 'priority' => 10, 'active_callback' => 'aces_topbar_enable', ) ) ); /**padding**/ $wp_customize->add_setting( 'aces_theme_topbar_top_padding', array( 'transport' => 'postMessage', 'default' => '0', 'sanitize_callback' => 'aces_sanitize_number', ) ); $wp_customize->add_setting( 'aces_theme_topbar_right_padding', array( 'transport' => 'postMessage', 'default' => '0', 'sanitize_callback' => 'aces_sanitize_number', ) ); $wp_customize->add_setting( 'aces_theme_topbar_bottom_padding', array( 'transport' => 'postMessage', 'default' => '0', 'sanitize_callback' => 'aces_sanitize_number', ) ); $wp_customize->add_setting( 'aces_theme_topbar_left_padding', array( 'transport' => 'postMessage', 'default' => '0', 'sanitize_callback' => 'aces_sanitize_number', ) ); $wp_customize->add_setting( 'aces_theme_topbar_tablet_top_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_tablet_right_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_tablet_bottom_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_tablet_left_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_mobile_top_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_mobile_right_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_mobile_bottom_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_setting( 'aces_theme_topbar_mobile_left_padding', array( 'transport' => 'postMessage', 'sanitize_callback' => 'aces_sanitize_number_blank', ) ); $wp_customize->add_control( new Aces_Customizer_Dimensions_Control( $wp_customize, 'aces_theme_topbar_padding_dimensions', array( 'label' => esc_html__( 'Padding (px)', 'aces' ), 'section' => 'aces_topbar_layout_section', 'settings' => array( 'desktop_top' => 'aces_theme_topbar_top_padding', 'desktop_right' => 'aces_theme_topbar_right_padding', 'desktop_bottom' => 'aces_theme_topbar_bottom_padding', 'desktop_left' => 'aces_theme_topbar_left_padding', 'tablet_top' => 'aces_theme_topbar_tablet_top_padding', 'tablet_right' => 'aces_theme_topbar_tablet_right_padding', 'tablet_bottom' => 'aces_theme_topbar_tablet_bottom_padding', 'tablet_left' => 'aces_theme_topbar_tablet_left_padding', 'mobile_top' => 'aces_theme_topbar_mobile_top_padding', 'mobile_right' => 'aces_theme_topbar_mobile_right_padding', 'mobile_bottom' => 'aces_theme_topbar_mobile_bottom_padding', 'mobile_left' => 'aces_theme_topbar_mobile_left_padding', ), 'priority' => 10, 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step' => 1, ), 'active_callback' => 'aces_topbar_enable', ) ) );