add_setting(
'add_more_slider',
array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( new WP_slider_pro_Customize_Control( $wp_customize, 'add_more_slider', array(
'section' => 'slider_section',
'setting' => 'add_more_slider',
)));
/* Services section */
$wp_customize->add_section( 'services_section' , array(
'title' => __('Service settings', 'busiprof'),
'panel' => 'section_settings',
'priority' => 3,
) );
//Hide Index Service Section
// Enable service more btn
$wp_customize->add_setting( 'busiprof_theme_options[enable_services]' , array( 'default' => 'on' , 'type'=>'option', 'sanitize_callback' => 'sanitize_text_field' ) );
$wp_customize->add_control( 'busiprof_theme_options[enable_services]' , array(
'label' => __( 'Enable services on homepage', 'busiprof' ),
'section' => 'services_section',
'type' => 'radio',
'choices' => array(
'on'=>'ON',
'off'=>'OFF'
)
));
//Service Heading One
$wp_customize->add_setting(
'busiprof_theme_options[service_heading_one]',
array(
'default' => __('
Awesome services','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_heading_one]',
array(
'label' => __('Title','busiprof'),
'section' => 'services_section',
'type' => 'text',
)
);
//Service Tagline Description
$wp_customize->add_setting(
'busiprof_theme_options[service_tagline]',
array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_tagline]',
array(
'label' => __('Description','busiprof'),
'section' => 'services_section',
'type' => 'textarea',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
)
);
//service section one
$wp_customize->add_setting(
'busiprof_theme_options[service_icon_one]', array(
'sanitize_callback' => 'sanitize_text_field',
'default' => 'fa-medkit',
'capability' => 'edit_theme_options',
'type' => 'option',
));
$wp_customize->add_control( 'busiprof_theme_options[service_icon_one]', array(
'label' => __('Icon', 'busiprof'),
'section' => 'services_section',
'type' => 'text',
));
//Service One Custom image
$wp_customize->add_setting( 'busiprof_theme_options[service_image_one]',array('default' => '',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[service_image_one]',
array(
'label' => 'Service One Custom Image',
'settings' =>'busiprof_theme_options[service_image_one]',
'section' => 'services_section',
'type' => 'upload',
)
)
);
//Service One Title
$wp_customize->add_setting(
'busiprof_theme_options[service_title_one]',
array(
'default' => __('Web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_title_one]',
array(
'label' => __('Title','busiprof'),
'section' => 'services_section',
'type' => 'text',
)
);
//Service One Description
$wp_customize->add_setting(
'busiprof_theme_options[service_text_one]',
array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_text_one]',
array(
'label' => __('Description','busiprof'),
'section' => 'services_section',
'type' => 'textarea',
)
);
//service section Two
$wp_customize->add_setting(
'busiprof_theme_options[service_icon_two]', array(
'sanitize_callback' => 'sanitize_text_field',
'default' => 'fa-truck',
'capability' => 'edit_theme_options',
'type' => 'option',
));
$wp_customize->add_control( 'busiprof_theme_options[service_icon_two]', array(
'label' => __('Icon', 'busiprof'),
'section' => 'services_section',
'type' => 'text',
));
//Service Two Custom image
$wp_customize->add_setting( 'busiprof_theme_options[service_image_two]',
array('type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[service_image_two]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[service_image_two]',
'section' => 'services_section',
'type' => 'upload',
)
)
);
//Service Two Title
$wp_customize->add_setting(
'busiprof_theme_options[service_title_two]',
array(
'default' => __('Web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_title_two]',
array(
'label' => __('Title','busiprof'),
'section' => 'services_section',
'type' => 'text',
)
);
//Service Two Description
$wp_customize->add_setting(
'busiprof_theme_options[service_text_two]',
array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_text_two]',
array(
'label' => __('Description','busiprof'),
'section' => 'services_section',
'type' => 'textarea',
)
);
//service section Three
$wp_customize->add_setting(
'busiprof_theme_options[service_icon_three]', array(
'sanitize_callback' => 'sanitize_text_field',
'default' => 'fa-camera',
'capability' => 'edit_theme_options',
'type' => 'option',
));
$wp_customize->add_control( 'busiprof_theme_options[service_icon_three]', array(
'label' => __('Icon', 'busiprof'),
'section' => 'services_section',
'type' => 'text',
));
//Service Three Custom image
$wp_customize->add_setting( 'busiprof_theme_options[service_image_three]',array('default' => '',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[service_image_three]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[service_image_three]',
'section' => 'services_section',
'type' => 'upload',
)
)
);
//Service Three Title
$wp_customize->add_setting(
'busiprof_theme_options[service_title_three]',
array(
'default' => __('Web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_title_three]',
array(
'label' => __('Title','busiprof'),
'section' => 'services_section',
'type' => 'text',
)
);
//Service Three Description
$wp_customize->add_setting(
'busiprof_theme_options[service_text_three]',
array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_text_three]',
array(
'label' => __('Description','busiprof'),
'section' => 'services_section',
'type' => 'textarea',
)
);
//service section Four
$wp_customize->add_setting(
'busiprof_theme_options[service_icon_four]', array(
'sanitize_callback' => 'sanitize_text_field',
'default' => 'fa-fighter-jet',
'capability' => 'edit_theme_options',
'type' => 'option',
));
$wp_customize->add_control( 'busiprof_theme_options[service_icon_four]', array(
'label' => __('Icon', 'busiprof'),
'section' => 'services_section',
'type' => 'text',
));
//Service Three Custom image
$wp_customize->add_setting( 'busiprof_theme_options[service_image_four]',array('default' => '',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[service_image_four]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[service_image_four]',
'section' => 'services_section',
'type' => 'upload',
)
)
);
//Service Three Title
$wp_customize->add_setting(
'busiprof_theme_options[service_title_four]',
array(
'default' => __('Web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_title_four]',
array(
'label' => __('Title','busiprof'),
'section' => 'services_section',
'type' => 'text',
)
);
//Service Three Description
$wp_customize->add_setting(
'busiprof_theme_options[service_text_four]',
array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
)
);
$wp_customize->add_control(
'busiprof_theme_options[service_text_four]',
array(
'label' => __('Description','busiprof'),
'section' => 'services_section',
'type' => 'textarea',
)
);
// Services Read More Text
$wp_customize->add_setting( 'busiprof_theme_options[service_button_value]',
array( 'default' => __('More services','busiprof') , 'type'=>'option', 'sanitize_callback' => 'sanitize_text_field' ) );
$wp_customize->add_control( 'busiprof_theme_options[service_button_value]',
array(
'label' => __('Button Text', 'busiprof' ),
'section' => 'services_section',
'type' => 'text',
));
// Services Read More Button URL
$wp_customize->add_setting( 'busiprof_theme_options[service_link_btn]', array( 'default' => '#' , 'type'=>'option', 'sanitize_callback' => 'sanitize_text_field' ) );
$wp_customize->add_control( 'busiprof_theme_options[service_link_btn]',
array(
'label' => __('Button Link', 'busiprof' ),
'section' => 'services_section',
'type' => 'text',
));
//Pro Service
class WP_service_pro_Customize_Control extends WP_Customize_Control {
public $type = 'new_menu';
/**
* Render the control's content.
*/
public function render_content() {
?>
add_setting(
'add_more_service',
array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( new WP_service_pro_Customize_Control( $wp_customize, 'add_more_service', array(
'section' => 'services_section',
'setting' => 'add_more_service',
)));
//Projects Setting
$wp_customize->add_section( 'projects_settings' , array(
'title' => __('Project settings', 'busiprof'),
'panel' => 'section_settings',
'priority' => 4,
) );
// Enable Projects
$wp_customize->add_setting( 'busiprof_theme_options[enable_projects]' , array( 'default' => 'on' , 'type'=>'option', 'sanitize_callback' => 'sanitize_text_field' ) );
$wp_customize->add_control( 'busiprof_theme_options[enable_projects]' , array(
'label' => __( 'Enable home project section', 'busiprof' ),
'section' => 'projects_settings',
'type' => 'radio',
'choices' => array(
'on'=>'ON',
'off'=>'OFF'
)
));
//Projects Heading One
$wp_customize->add_setting(
'busiprof_theme_options[protfolio_tag_line]', array(
'default' => __('
Recent projects','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[protfolio_tag_line]', array(
'label' => __('Title', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Projects Heading two
$wp_customize->add_setting(
'busiprof_theme_options[protfolio_description_tag]', array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[protfolio_description_tag]', array(
'label' => __('Description', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Project One Title
$wp_customize->add_setting(
'busiprof_theme_options[project_title_one]', array(
'default' => __('Business cards','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_title_one]', array(
'label' => __('Project one', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Projects one image
$wp_customize->add_setting( 'busiprof_theme_options[project_thumb_one]',array('default' => get_template_directory_uri().'/images/default/rec_project.jpg',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[project_thumb_one]',
array(
'label' => __('Image','busiprof'),
'section' => 'example_section_one',
'settings' =>'busiprof_theme_options[project_thumb_one]',
'section' => 'projects_settings',
'type' => 'upload',
)
)
);
//Project One Description
$wp_customize->add_setting(
'busiprof_theme_options[project_text_one]', array(
'default' => __('Graphic design & web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_text_one]', array(
'label' => __('Description', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Project Two Title
$wp_customize->add_setting(
'busiprof_theme_options[project_title_two]', array(
'default' => __('Business cards','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_title_two]', array(
'label' => __('Project two', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Projects Two image
$wp_customize->add_setting( 'busiprof_theme_options[project_thumb_two]',array('default' => get_template_directory_uri().'/images/default/rec_project2.jpg',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[project_thumb_two]',
array(
'label' => __('Image','busiprof'),
'section' => 'example_section_one',
'settings' =>'busiprof_theme_options[project_thumb_two]',
'section' => 'projects_settings',
'type' => 'upload',
)
)
);
//Project Two Description
$wp_customize->add_setting(
'busiprof_theme_options[project_text_two]', array(
'default' => __('Graphic design & web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_text_two]', array(
'label' => __('Description', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Project Three Title
$wp_customize->add_setting(
'busiprof_theme_options[project_title_three]', array(
'default' => __('Business cards','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_title_three]', array(
'label' => __('Project three', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Projects Three image
$wp_customize->add_setting( 'busiprof_theme_options[project_thumb_three]',array('default' => get_template_directory_uri().'/images/default/rec_project3.jpg',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[project_thumb_three]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[project_thumb_three]',
'section' => 'projects_settings',
'type' => 'upload',
)
)
);
//Project three Description
$wp_customize->add_setting(
'busiprof_theme_options[project_text_three]', array(
'default' => __('Graphic design & web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_text_three]', array(
'label' => __('Description', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Project Four Title
$wp_customize->add_setting(
'busiprof_theme_options[project_title_four]', array(
'default' => __('Business cards','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_title_four]', array(
'label' => __('Project four', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Projects four image
$wp_customize->add_setting( 'busiprof_theme_options[project_thumb_four]',array('default' => get_template_directory_uri().'/images/default/rec_project4.jpg',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[project_thumb_four]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[project_thumb_four]',
'section' => 'projects_settings',
'type' => 'upload',
)
)
);
//Project Four Description
$wp_customize->add_setting(
'busiprof_theme_options[project_text_four]', array(
'default' => __('Graphic design & web design','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[project_text_four]', array(
'label' => __('Description', 'busiprof'),
'section' => 'projects_settings',
'type' => 'text',
));
//Upgrade to Pro
class WP_Projects_Customize_Control extends WP_Customize_Control {
public $type = 'new_menu';
/**
* Render the control's content.
*/
public function render_content() {
?>
add_setting(
'Projects_pro',
array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( new WP_Projects_Customize_Control( $wp_customize, 'Projects_pro', array(
'section' => 'projects_settings',
'setting' => 'Projects_pro',
))
);
//Testimonial Section
$wp_customize->add_section( 'testimonial_settings' , array(
'title' => __('Testimonial setting', 'busiprof'),
'panel' => 'section_settings',
'priority' => 5,
) );
//Testimonail Title
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_title]', array(
'default' => __('
Our Testimonials','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_title]', array(
'label' => __('Title', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Testimonail Description
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_text]', array(
'default' => __('We are a group of passionate designers & developers','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_text]', array(
'label' => __('Description', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'textarea',
));
//Testimonail One Image
$wp_customize->add_setting( 'busiprof_theme_options[testimonials_image_one]',array('default' => get_template_directory_uri().'/images/default/testimonial.jpg',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[testimonials_image_one]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[testimonials_image_one]',
'section' => 'testimonial_settings',
'type' => 'upload',
)
)
);
//Testimonail One Author Description
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_text_one]', array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_text_one]', array(
'label' => __('Description', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Testimonail One Author
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_name_one]', array(
'default' => 'Natalie Portman',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_name_one]', array(
'label' => __('Author', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Testimonail one Author Designation
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_designation_one]', array(
'default' => __('(Sales & Marketing)','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_designation_one]', array(
'label' => __('Designation', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Testimonail Two Image
$wp_customize->add_setting( 'busiprof_theme_options[testimonials_image_two]',array('default' => get_template_directory_uri().'/images/default/testimonial2.jpg',
'type' => 'option','sanitize_callback' => 'esc_url_raw',));
$wp_customize->add_control(
new WP_Customize_Image_Control(
$wp_customize,
'busiprof_theme_options[testimonials_image_two]',
array(
'label' => __('Image','busiprof'),
'settings' =>'busiprof_theme_options[testimonials_image_two]',
'section' => 'testimonial_settings',
'type' => 'upload',
)
)
);
//Testimonail Two Author Description
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_text_two]', array(
'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_text_two]', array(
'label' => __('Description', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Testimonail Two Author
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_name_two]', array(
'default' => 'Natalie Portman',
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_name_two]', array(
'label' => __('Author', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Testimonail one Author Designation
$wp_customize->add_setting(
'busiprof_theme_options[testimonials_designation_two]', array(
'default' => __('(Sales & Marketing)','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[testimonials_designation_two]', array(
'label' => __('Designation', 'busiprof'),
'section' => 'testimonial_settings',
'type' => 'text',
));
//Recent Blog Setting
$wp_customize->add_section( 'recent_blog_settings' , array(
'title' => __('Recent blog setting', 'busiprof'),
'panel' => 'section_settings',
'priority' => 6,
) );
//Recent Blog Title
$wp_customize->add_setting('busiprof_theme_options[recent_blog_title]',array(
'default' => __('
Recent blog','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[recent_blog_title]',array(
'label' => __('Title','busiprof'),
'section'=> 'recent_blog_settings',
'type'=> 'text',
));
//Recent Blog Description
$wp_customize->add_setting('busiprof_theme_options[recent_blog_description]',array(
'default' => __('We are a group of passionate designers & developers','busiprof'),
'capability' => 'edit_theme_options',
'sanitize_callback' => 'busiprof_input_field_sanitize_text',
'type' => 'option',
));
$wp_customize->add_control('busiprof_theme_options[recent_blog_description]',array(
'label' => __('Description','busiprof'),
'section'=> 'recent_blog_settings',
'type'=> 'textarea',
));
/* Client Slider Section */
$wp_customize->add_section( 'clientslider_section' , array(
'title' => __('Client slider setting', 'busiprof'),
'panel' => 'section_settings',
'priority' => 7,
) );
//Client Pro
class busiprof_Customize_client_upgrade extends WP_Customize_Control {
public function render_content() { ?>
add_setting( 'client_upgrade', array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'wp_filter_nohtml_kses',
));
$wp_customize->add_control(
new busiprof_Customize_client_upgrade(
$wp_customize,
'client_upgrade',
array(
'section' => 'clientslider_section',
'settings' => 'client_upgrade',
)
)
);
// Enable Client Strip
$wp_customize->add_setting( 'busiprof_pro_theme_options[home_client_section_enabled]' , array( 'default' => 'on' , 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field', ) );
$wp_customize->add_control( 'busiprof_pro_theme_options[home_client_section_enabled]' , array(
'label' => __('Enable home client section', 'busiprof' ),
'section' => 'clientslider_section',
'type' => 'radio',
'choices' => array(
'on'=>'ON',
'off'=>'OFF'
)
));
// Client section title
$wp_customize->add_setting( 'busiprof_pro_theme_options[client_title]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => __('Meet our clients','busiprof') , 'type'=>'option',) );
$wp_customize->add_control( 'busiprof_pro_theme_options[client_title]',
array(
'label' => __( 'Title', 'busiprof' ),
'section' => 'clientslider_section',
'type' => 'text',
'input_attrs' => array('disabled' => 'disabled'),
));
// Client section Description
$wp_customize->add_setting( 'busiprof_pro_theme_options[client_desc]', array( 'sanitize_callback' => 'sanitize_text_field', 'default' => __('We are a group of passionate designers and developers who really love to create awesome wordpress themes & support','busiprof') , 'type'=>'option' ) );
$wp_customize->add_control( 'busiprof_pro_theme_options[client_desc]',
array(
'label' => __('Description', 'busiprof' ),
'section' => 'clientslider_section',
'type' => 'text',
'input_attrs' => array('disabled' => 'disabled'),
));
// client to show
$wp_customize->add_setting( 'busiprof_pro_theme_options[client_strip_total]', array( 'default' => 5 , 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field', ) );
$wp_customize->add_control( 'busiprof_pro_theme_options[client_strip_total]',
array(
'label' => __('No. of clients show', 'busiprof' ),
'section' => 'clientslider_section',
'type' => 'select',
'choices'=>array(
'5'=>'5',
)
));
// Client Strip slide Speed
$wp_customize->add_setting( 'busiprof_pro_theme_options[client_strip_slide_speed]', array( 'default' => 2000 , 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field', ) );
$wp_customize->add_control( 'busiprof_pro_theme_options[client_strip_slide_speed]',
array(
'label' => __('Animation speed', 'busiprof' ),
'section' => 'clientslider_section',
'type' => 'select',
'choices' => array(
'2000'=>'2.0',
)
));
//link
class WP_client_Customize_Control extends WP_Customize_Control {
public $type = 'new_menu';
/**
* Render the control's content.
*/
public function render_content() {
?>
add_setting(
'pro_cleint',
array(
'capability' => 'edit_theme_options',
'sanitize_callback' => 'sanitize_text_field',
)
);
$wp_customize->add_control( new WP_client_Customize_Control( $wp_customize, 'pro_cleint', array(
'section' => 'clientslider_section',
))
);
function busiprof_input_field_sanitize_text( $input )
{
return wp_kses_post( force_balance_tags( $input ) );
}
function busiprof_input_field_sanitize_html( $input )
{
return force_balance_tags( $input );
}
}
add_action( 'customize_register', 'busiprof_sections_settings' );
/**
* Add selective refresh for Front page section section controls.
*/
function busiprof_register_home_section_partials( $wp_customize ){
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[slider_head_title]', array(
'selector' => '.header-title h2',
'settings' => 'busiprof_theme_options[slider_head_title]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[caption_head]', array(
'selector' => '.slide-caption h2',
'settings' => 'busiprof_theme_options[caption_head]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[caption_text]', array(
'selector' => '.slide-caption p',
'settings' => 'busiprof_theme_options[caption_text]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[service_heading_one]', array(
'selector' => '.service .section-title .section-heading',
'settings' => 'busiprof_theme_options[service_heading_one]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[service_tagline]', array(
'selector' => '.service .section-title p',
'settings' => 'busiprof_theme_options[service_tagline]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[service_icon_one]', array(
'selector' => '.service #service_content',
'settings' => 'busiprof_theme_options[service_icon_one]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[service_button_value]', array(
'selector' => '.services_more_btn',
'settings' => 'busiprof_theme_options[service_button_value]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[protfolio_tag_line]', array(
'selector' => '.portfolio .section-title h1',
'settings' => 'busiprof_theme_options[protfolio_tag_line]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[protfolio_description_tag]', array(
'selector' => '.portfolio .section-title p',
'settings' => 'busiprof_theme_options[protfolio_description_tag]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[project_title_one]', array(
'selector' => '.portfolio #myTabContent',
'settings' => 'busiprof_theme_options[project_title_one]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[testimonials_title]', array(
'selector' => '.testimonial .section-title-small .section-heading',
'settings' => 'busiprof_theme_options[testimonials_title]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[testimonials_text]', array(
'selector' => '.testimonial .section-title-small p',
'settings' => 'busiprof_theme_options[testimonials_text]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[testimonials_image_one]', array(
'selector' => '.testimonial #post1',
'settings' => 'busiprof_theme_options[testimonials_image_one]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[testimonials_image_two]', array(
'selector' => '.testimonial #post2',
'settings' => 'busiprof_theme_options[testimonials_image_two]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[recent_blog_title]', array(
'selector' => '.home-post .section-title-small .section-heading',
'settings' => 'busiprof_theme_options[recent_blog_title]',
) );
$wp_customize->selective_refresh->add_partial( 'busiprof_theme_options[recent_blog_description]', array(
'selector' => '.home-post .section-title-small p',
'settings' => 'busiprof_theme_options[recent_blog_description]',
) );
}
add_action( 'customize_register', 'busiprof_register_home_section_partials' );