add_panel( 'bizvilla_test_setting', array(
'priority' => 850,
'capability' => 'edit_theme_options',
'title' => __('Testimonial Settings', 'bizvilla'),
) );
$wp_customize->add_section(
'test_section_settings',
array(
'title' => __('Home Testimonial Settings','bizvilla'),
'description' => '',
'panel' => 'bizvilla_test_setting',)
);
$wp_customize->add_setting( 'bizvilla_options[testimonial_upgrade]', array(
'default' => false,
'capability' => 'edit_theme_options',
'sanitize_callback' => 'wp_filter_nohtml_kses',
));
$wp_customize->add_control(
new bizvilla_Customize_testimonial_upgrade(
$wp_customize,
'bizvilla_options[testimonial_upgrade]',
array(
'label' => __('Appointement Upgrade','bizvilla'),
'section' => 'test_section_settings',
'settings' => 'bizvilla_options[testimonial_upgrade]',
)
)
);
// add section to manage callout
$wp_customize->add_setting(
'bizvilla_options[testimonial_title]',
array(
'default' => __('What Our Clients Say','bizvilla'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control( 'bizvilla_options[testimonial_title]',array(
'label' => __('Testimonial Title','bizvilla'),
'section' => 'test_section_settings',
'type' => 'text','input_attrs' => array('disabled' => 'disabled')) );
$wp_customize->add_setting(
'bizvilla_options[testimonial_description]',
array(
'default' => __('Read what customers are saying.','bizvilla'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control( 'bizvilla_options[testimonial_description]',array(
'label' => __('Testimonial Description','bizvilla'),
'section' => 'test_section_settings',
'type' => 'text',
'input_attrs' => array('disabled' => 'disabled')
) );
//Testimonial animation
$wp_customize->add_setting(
'bizvilla_options[testi_slide_type]',
array(
'default' => __('slide','bizvilla'),
'type' => 'option',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control(
'bizvilla_options[testi_slide_type]',
array(
'type' => 'select',
'label' => __('Select Testimonial Animation','bizvilla'),
'section' => 'test_section_settings',
'choices' => array('slide'=>__('slide', 'bizvilla'), 'carousel-fade'=>__('Fade', 'bizvilla')),
));
//Testimonail Animation duration
$wp_customize->add_setting(
'bizvilla_options[testi_transition_delay]',
array(
'default' => __('2000','bizvilla'),
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option'
)
);
$wp_customize->add_control(
'bizvilla_options[testi_transition_delay]',
array(
'type' => 'text',
'description' => __('If you choose Transction Delay 2000 that means 2 second','bizvilla'),
'label' => __('Input Testimonial Duration','bizvilla'),
'section' => 'test_section_settings','input_attrs' => array('disabled' => 'disabled')
));
//Testimonail link
class WP_testmonial_Customize_Control extends WP_Customize_Control {
public $type = 'new_menu';
/**
* Render the control's content.
*/
public function render_content() {
?>
add_setting(
'testimonial',
array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( new WP_testmonial_Customize_Control( $wp_customize, 'testimonial', array(
'label' => __('Discover bizvilla Pro','bizvilla'),
'section' => 'test_section_settings',
))
);
}
add_action( 'customize_register', 'bizvilla_testimonial_customizer' );
?>