add_buttons_style_section(); $this->add_buttons_style_controls(); } /** * Add the customizer section. */ private function add_buttons_style_section() { $this->add_section( new Hestia_Customizer_Section( 'hestia_buttons_style', array( 'title' => esc_html__( 'Button', 'hestia' ), 'panel' => 'hestia_appearance_settings', 'priority' => 150, ) ) ); } /** * Add buttons style controls */ private function add_buttons_style_controls() { /** * Buttons Padding */ $this->add_control( new Hestia_Customizer_Control( 'hestia_button_padding_dimensions', array( 'transport' => 'postMessage', 'sanitize_callback' => 'hestia_sanitize_dimension', 'default' => apply_filters( 'hestia_button_padding_dimensions_default', json_encode( array( 'desktop' => json_encode( array( 'desktop_vertical' => 15, 'desktop_horizontal' => 33, ) ), ) ) ), ), array( 'label' => esc_html__( 'Padding (px)', 'hestia' ), 'section' => 'hestia_buttons_style', 'priority' => 10, 'input_attrs' => array( 'min' => 0, 'max' => 100, 'step' => 1, ), ), 'Hestia_Customizer_Dimensions' ) ); /** * Border Radius */ $this->add_control( new Hestia_Customizer_Control( 'hestia_buttons_border_radius', array( 'sanitize_callback' => 'hestia_sanitize_range_value', 'default' => apply_filters( 'hestia_buttons_border_radius_default', 3 ), 'transport' => 'postMessage', ), array( 'label' => esc_html__( 'Border radius', 'hestia' ), 'section' => 'hestia_buttons_style', 'type' => 'range-value', 'input_attr' => array( 'min' => 0, 'max' => 50, 'step' => 1, ), 'priority' => 20, ), 'Hestia_Customizer_Range_Value_Control' ) ); } }