'ffffff', )); add_image_size( 'healthcare-clinic-featured-image', 2000, 1200, true ); add_image_size( 'healthcare-clinic-thumbnail-avatar', 100, 100, true ); $GLOBALS['content_width'] = 525; register_nav_menus( array( 'primary' => __( 'Primary Menu', 'healthcare-clinic' ), ) ); add_theme_support( 'html5', array( 'comment-form', 'comment-list', 'gallery', 'caption', ) ); // Add theme support for Custom Logo. add_theme_support( 'custom-logo', array( 'width' => 250, 'height' => 250, 'flex-width' => true, 'flex-height' => true, ) ); /* * This theme styles the visual editor to resemble the theme style, * specifically font, colors, and column width. */ add_editor_style( array( 'assets/css/editor-style.css', medical_care_fonts_url() ) ); if ( ! defined( 'MEDICAL_CARE_SUPPORT' ) ) { define('MEDICAL_CARE_SUPPORT',__('https://wordpress.org/support/theme/medical-care/','medical-care')); } if ( ! defined( 'MEDICAL_CARE_REVIEW' ) ) { define('MEDICAL_CARE_REVIEW',__('https://wordpress.org/support/theme/medical-care/reviews/','medical-care')); } if ( ! defined( 'MEDICAL_CARE_LIVE_DEMO' ) ) { define('MEDICAL_CARE_LIVE_DEMO',__('https://trial.ovationthemes.com/ovation-medical-care-pro/','medical-care')); } if ( ! defined( 'MEDICAL_CARE_BUY_PRO' ) ) { define('MEDICAL_CARE_BUY_PRO',__('https://www.ovationthemes.com/products/medical-wordpress-theme','medical-care')); } if ( ! defined( 'MEDICAL_CARE_PRO_DOC' ) ) { define('MEDICAL_CARE_PRO_DOC',__('https://trial.ovationthemes.com/docs/ot-medical-pro/','medical-care')); } if ( ! defined( 'MEDICAL_CARE_FREE_DOC' ) ) { define('MEDICAL_CARE_FREE_DOC',__('https://trial.ovationthemes.com/docs/ot-medical-care-free-doc/','medical-care')); } if ( ! defined( 'MEDICAL_CARE_THEME_NAME' ) ) { define('MEDICAL_CARE_THEME_NAME',__('Premium Medical Theme','medical-care')); } } add_action( 'after_setup_theme', 'healthcare_clinic_setup' ); // widgets function healthcare_clinic_widgets_init() { register_sidebar( array( 'name' => __( 'Sidebar', 'healthcare-clinic' ), 'id' => 'sidebar-1', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Page Sidebar', 'healthcare-clinic' ), 'id' => 'sidebar-2', 'description' => __( 'Add widgets here to appear in your pages and posts', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar 3', 'healthcare-clinic' ), 'id' => 'sidebar-3', 'description' => __( 'Add widgets here to appear in your sidebar on blog posts and archive pages.', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 1', 'healthcare-clinic' ), 'id' => 'footer-1', 'description' => __( 'Add widgets here to appear in your footer.', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 2', 'healthcare-clinic' ), 'id' => 'footer-2', 'description' => __( 'Add widgets here to appear in your footer.', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 3', 'healthcare-clinic' ), 'id' => 'footer-3', 'description' => __( 'Add widgets here to appear in your footer.', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Footer 4', 'healthcare-clinic' ), 'id' => 'footer-4', 'description' => __( 'Add widgets here to appear in your footer.', 'healthcare-clinic' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } add_action( 'widgets_init', 'healthcare_clinic_widgets_init' ); // remove sections function healthcare_clinic_customize_register() { global $wp_customize; $wp_customize->remove_section( 'medical_care_pro' ); $wp_customize->remove_section( 'medical_care_header' ); $wp_customize->remove_setting('medical_care_slider_content_alignment'); $wp_customize->remove_control('medical_care_slider_content_alignment'); $wp_customize->remove_setting('medical_care_slider_excerpt_show_hide'); $wp_customize->remove_control('medical_care_slider_excerpt_show_hide'); $wp_customize->remove_setting('medical_care_slider_read_more'); $wp_customize->remove_control('medical_care_slider_read_more'); $wp_customize->remove_setting('medical_care_footer_text'); $wp_customize->remove_control('medical_care_footer_text'); $wp_customize->remove_setting('medical_care_primary_color'); $wp_customize->remove_control('medical_care_primary_color'); $wp_customize->remove_setting('medical_care_service_bg'); $wp_customize->remove_control('medical_care_service_bg'); $wp_customize->remove_setting('medical_care_heading_color'); $wp_customize->remove_control('medical_care_heading_color'); $wp_customize->remove_setting('medical_care_text_color'); $wp_customize->remove_control('medical_care_text_color'); $wp_customize->remove_setting('medical_care_menu_text_transform'); $wp_customize->remove_control('medical_care_menu_text_transform'); $wp_customize->remove_setting('medical_care_slider_opacity'); $wp_customize->remove_control('medical_care_slider_opacity'); $wp_customize->remove_setting('medical_care_slider_overlay'); $wp_customize->remove_control('medical_care_slider_overlay'); $wp_customize->remove_setting('medical_care_slider_excerpt_color'); $wp_customize->remove_control('medical_care_slider_excerpt_color'); $wp_customize->remove_setting('medical_care_slider_heading_color'); $wp_customize->remove_control('medical_care_slider_heading_color'); } add_action( 'customize_register', 'healthcare_clinic_customize_register', 11 ); // comments function healthcare_clinic_enqueue_comments_reply() { if( get_option( 'thread_comments' ) ) { wp_enqueue_script( 'comment-reply' ); } } add_action( 'comment_form_before', 'healthcare_clinic_enqueue_comments_reply' ); // Footer Text function healthcare_clinic_copyright_link() { $healthcare_clinic_footer_text = get_theme_mod('healthcare_clinic_footer_text', esc_html__('Healthcare WordPress Theme', 'healthcare-clinic')); $healthcare_clinic_credit_link = esc_url('https://www.ovationthemes.com/products/free-healthcare-wordpress-theme'); echo '' . esc_html($healthcare_clinic_footer_text) . '' . esc_html__(' By Ovation Themes', 'healthcare-clinic') . ''; } // customizer function healthcare_clinic_customize( $wp_customize ) { wp_enqueue_style('customizercustom_css', esc_url( get_stylesheet_directory_uri() ). '/assets/css/customizer.css'); require get_theme_file_path( 'inc/custom-control.php' ); // fontawesome icon-picker load_template( trailingslashit( get_theme_file_path() ) . '/inc/icon-picker.php' ); // pro section $wp_customize->add_section('healthcare_clinic_pro', array( 'title' => __('UPGRADE HEALTHCARE PREMIUM', 'healthcare-clinic'), 'priority' => 1, )); $wp_customize->add_setting('healthcare_clinic_pro', array( 'default' => null, 'sanitize_callback' => 'sanitize_text_field', )); $wp_customize->add_control(new Healthcare_Clinic_Pro_Control($wp_customize, 'healthcare_clinic_pro', array( 'label' => __('HEALTHCARE CLICNIC PREMIUM', 'healthcare-clinic'), 'section' => 'healthcare_clinic_pro', 'settings' => 'healthcare_clinic_pro', 'priority' => 1, ))); $wp_customize->add_setting('healthcare_clinic_text_transform',array( 'default' => 'CAPITALISE', 'sanitize_callback' => 'medical_care_sanitize_choices' )); $wp_customize->add_control('healthcare_clinic_text_transform',array( 'type' => 'select', 'label' => __('Menus Text Transform','healthcare-clinic'), 'section' => 'medical_care_theme_settings', 'choices' => array( 'CAPITALISE' => __('CAPITALISE','healthcare-clinic'), 'UPPERCASE' => __('UPPERCASE','healthcare-clinic'), 'LOWERCASE' => __('LOWERCASE','healthcare-clinic'), ), ) ); // Social Media $wp_customize->add_section('healthcare_clinic_urls',array( 'title' => __('Social Media', 'healthcare-clinic'), 'panel' => 'medical_care_custompage_panel', 'priority' => 2, ) ); $wp_customize->add_setting( 'healthcare_clinic_facebook_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Section_Heading( $wp_customize, 'healthcare_clinic_facebook_heading', array( 'label' => esc_html__( 'Facebook settings', 'healthcare-clinic' ), 'section' => 'healthcare_clinic_urls', 'settings' => 'healthcare_clinic_facebook_heading', ) ) ); $wp_customize->add_setting('healthcare_clinic_facebook',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_facebook',array( 'label' => esc_html__('Add URL','healthcare-clinic'), 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_facebook', 'type' => 'url' )); $wp_customize->add_setting('healthcare_clinic_facebook_icon',array( 'default' => 'fab fa-facebook-f', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new Healthcare_Clinic_Fontawesome_Icon_Chooser( $wp_customize,'healthcare_clinic_facebook_icon',array( 'label' => __('Icon','healthcare-clinic'), 'transport' => 'refresh', 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_facebook_icon', 'type' => 'icon', ))); $wp_customize->add_setting( 'healthcare_clinic_header_fb_target', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_header_fb_target', array( 'settings' => 'healthcare_clinic_header_fb_target', 'section' => 'healthcare_clinic_urls', 'label' => __( 'Open link in a new tab', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), ) ) ); $wp_customize->add_setting( 'healthcare_clinic_twitter_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Section_Heading( $wp_customize, 'healthcare_clinic_twitter_heading', array( 'label' => esc_html__( 'Twitter settings', 'healthcare-clinic' ), 'section' => 'healthcare_clinic_urls', 'settings' => 'healthcare_clinic_twitter_heading', ) ) ); $wp_customize->add_setting('healthcare_clinic_twitter',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_twitter',array( 'label' => esc_html__('Add URL','healthcare-clinic'), 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_twitter', 'type' => 'url' )); $wp_customize->add_setting('healthcare_clinic_twitter_icon',array( 'default' => 'fab fa-x-twitter', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new Healthcare_Clinic_Fontawesome_Icon_Chooser( $wp_customize,'healthcare_clinic_twitter_icon',array( 'label' => __('Icon','healthcare-clinic'), 'transport' => 'refresh', 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_twitter_icon', 'type' => 'icon', ))); $wp_customize->add_setting( 'healthcare_clinic_header_twt_target', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_header_twt_target', array( 'settings' => 'healthcare_clinic_header_twt_target', 'section' => 'healthcare_clinic_urls', 'label' => __( 'Open link in a new tab', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), ) ) ); $wp_customize->add_setting( 'healthcare_clinic_youtube_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Section_Heading( $wp_customize, 'healthcare_clinic_youtube_heading', array( 'label' => esc_html__( 'Youtube settings', 'healthcare-clinic' ), 'section' => 'healthcare_clinic_urls', 'settings' => 'healthcare_clinic_youtube_heading', ) ) ); $wp_customize->add_setting('healthcare_clinic_youtube',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_youtube',array( 'label' => esc_html__('Add URL','healthcare-clinic'), 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_youtube', 'type' => 'url' )); $wp_customize->add_setting('healthcare_clinic_youtube_icon',array( 'default' => 'fab fa-youtube', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new Healthcare_Clinic_Fontawesome_Icon_Chooser( $wp_customize,'healthcare_clinic_youtube_icon',array( 'label' => __('Icon','healthcare-clinic'), 'transport' => 'refresh', 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_youtube_icon', 'type' => 'icon', ))); $wp_customize->add_setting( 'healthcare_clinic_header_ut_target', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_header_ut_target', array( 'settings' => 'healthcare_clinic_header_ut_target', 'section' => 'healthcare_clinic_urls', 'label' => __( 'Open link in a new tab', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), ) ) ); $wp_customize->add_setting( 'healthcare_clinic_instagram_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Section_Heading( $wp_customize, 'healthcare_clinic_instagram_heading', array( 'label' => esc_html__( 'Instagram settings', 'healthcare-clinic' ), 'section' => 'healthcare_clinic_urls', 'settings' => 'healthcare_clinic_instagram_heading', ) ) ); $wp_customize->add_setting('healthcare_clinic_instagram',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_instagram',array( 'label' => esc_html__('Add URL','healthcare-clinic'), 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_instagram', 'type' => 'url' )); $wp_customize->add_setting('healthcare_clinic_instagram_icon',array( 'default' => 'fab fa-instagram', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new Healthcare_Clinic_Fontawesome_Icon_Chooser( $wp_customize,'healthcare_clinic_instagram_icon',array( 'label' => __('Icon','healthcare-clinic'), 'transport' => 'refresh', 'section' => 'healthcare_clinic_urls', 'setting' => 'healthcare_clinic_instagram_icon', 'type' => 'icon', ))); $wp_customize->add_setting( 'healthcare_clinic_header_ins_target', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_header_ins_target', array( 'settings' => 'healthcare_clinic_header_ins_target', 'section' => 'healthcare_clinic_urls', 'label' => __( 'Open link in a new tab', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), ) ) ); // Top Bar Links $wp_customize->add_section('healthcare_clinic_topbar_links',array( 'title' => __('Header Settings', 'healthcare-clinic'), 'panel' => 'medical_care_custompage_panel', 'priority' => 2, ) ); $wp_customize->add_setting( 'healthcare_clinic_topbar_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Section_Heading( $wp_customize, 'healthcare_clinic_topbar_heading', array( 'label' => esc_html__( 'Header Settings', 'healthcare-clinic' ), 'description' => __( 'Add menu links in the below feilds', 'healthcare-clinic' ), 'section' => 'healthcare_clinic_topbar_links', 'settings' => 'healthcare_clinic_topbar_heading', ) ) ); $wp_customize->add_setting( 'healthcare_clinic_top_bar_show_hide', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_top_bar_show_hide', array( 'settings' => 'healthcare_clinic_top_bar_show_hide', 'section' => 'healthcare_clinic_topbar_links', 'label' => __( 'Check to show top bar', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), 'active_callback' => '', ) ) ); $wp_customize->add_setting('healthcare_clinic_text1',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('healthcare_clinic_text1',array( 'label' => esc_html__('Text 1','healthcare-clinic'), 'section' => 'healthcare_clinic_topbar_links', 'setting' => 'healthcare_clinic_text1', 'type' => 'text' )); $wp_customize->selective_refresh->add_partial( 'healthcare_clinic_text1', array( 'selector' => '.topbar_links a', 'render_callback' => 'medical_care_customize_partial_healthcare_clinic_text1', ) ); $wp_customize->add_setting('healthcare_clinic_link1',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_link1',array( 'label' => esc_html__('URL 1','healthcare-clinic'), 'section' => 'healthcare_clinic_topbar_links', 'setting' => 'healthcare_clinic_link1', 'type' => 'url' )); $wp_customize->add_setting('healthcare_clinic_text2',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('healthcare_clinic_text2',array( 'label' => esc_html__('Text 2','healthcare-clinic'), 'section' => 'healthcare_clinic_topbar_links', 'setting' => 'healthcare_clinic_text2', 'type' => 'text' )); $wp_customize->add_setting('healthcare_clinic_link2',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_link2',array( 'label' => esc_html__('URL 2','healthcare-clinic'), 'section' => 'healthcare_clinic_topbar_links', 'setting' => 'healthcare_clinic_link2', 'type' => 'url' )); $wp_customize->add_setting('healthcare_clinic_text3',array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('healthcare_clinic_text3',array( 'label' => esc_html__('Text 3','healthcare-clinic'), 'section' => 'healthcare_clinic_topbar_links', 'setting' => 'healthcare_clinic_text3', 'type' => 'text' )); $wp_customize->add_setting('healthcare_clinic_link3',array( 'default' => '', 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('healthcare_clinic_link3',array( 'label' => esc_html__('URL 3','healthcare-clinic'), 'section' => 'healthcare_clinic_topbar_links', 'setting' => 'healthcare_clinic_link3', 'type' => 'url' )); //slider $wp_customize->add_setting( 'healthcare_clinic_slider_excerpt_show_hide', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_slider_excerpt_show_hide', array( 'settings' => 'healthcare_clinic_slider_excerpt_show_hide', 'section' => 'medical_care_slider_section', 'label' => __( 'Show Hide excerpt', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), 'priority' => 4, ) ) ); $wp_customize->add_setting('healthcare_clinic_read_more',array( 'default' => 'Know More', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('healthcare_clinic_read_more',array( 'label' => esc_html__('Button Text','healthcare-clinic'), 'section' => 'medical_care_slider_section', 'setting' => 'healthcare_clinic_read_more', 'type' => 'text', 'priority' => 6, )); $wp_customize->add_setting('healthcare_clinic_slider_content_alignment',array( 'default' => 'RIGHT-ALIGN', 'sanitize_callback' => 'medical_care_sanitize_choices' )); $wp_customize->add_control('healthcare_clinic_slider_content_alignment',array( 'type' => 'radio', 'label' => __('Slider Content Alignment', 'healthcare-clinic'), 'section' => 'medical_care_slider_section', 'type' => 'select', 'choices' => array( 'LEFT-ALIGN' => __('LEFT','healthcare-clinic'), 'CENTER-ALIGN' => __('CENTER','healthcare-clinic'), 'RIGHT-ALIGN' => __('RIGHT','healthcare-clinic'), ), 'priority' => 7, ) ); $wp_customize->add_setting('healthcare_clinic_slider_overlay', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'healthcare_clinic_slider_overlay', array( 'section' => 'medical_care_slider_section', 'label' => esc_html__('Slider Overlay Color', 'healthcare-clinic'), 'priority' => 8, ))); $wp_customize->add_setting('healthcare_clinic_slider_opacity',array( 'default' => '1', 'sanitize_callback' => 'medical_care_sanitize_choices' )); $wp_customize->add_control('healthcare_clinic_slider_opacity',array( 'type' => 'radio', 'label' => __('Slider Opacity', 'healthcare-clinic'), 'section' => 'medical_care_slider_section', 'type' => 'select', 'choices' => array( '0' => __('0','healthcare-clinic'), '0.1' => __('0.1','healthcare-clinic'), '0.2' => __('0.2','healthcare-clinic'), '0.3' => __('0.3','healthcare-clinic'), '0.4' => __('0.4','healthcare-clinic'), '0.5' => __('0.5','healthcare-clinic'), '0.6' => __('0.6','healthcare-clinic'), '0.7' => __('0.7','healthcare-clinic'), '0.8' => __('0.8','healthcare-clinic'), '0.9' => __('0.9','healthcare-clinic'), '1' => __('1','healthcare-clinic') ), ) ); // About us $wp_customize->add_section( 'healthcare_clinic_middle_section' , array( 'title' => __( 'About us Settings', 'healthcare-clinic' ), 'panel' => 'medical_care_custompage_panel', 'priority' => 3, ) ); $wp_customize->add_setting( 'healthcare_clinic_about_heading', array( 'default' => '', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Section_Heading( $wp_customize, 'healthcare_clinic_about_heading', array( 'label' => esc_html__( 'About us Settings', 'healthcare-clinic' ), 'section' => 'healthcare_clinic_middle_section', 'settings' => 'healthcare_clinic_about_heading', ) ) ); $wp_customize->add_setting( 'healthcare_clinic_about_show_hide', array( 'type' => 'option', 'capability' => 'edit_theme_options', 'theme_supports' => '', 'default' => '1', 'transport' => 'refresh', 'sanitize_callback' => 'medical_care_callback_sanitize_switch', ) ); $wp_customize->add_control( new Healthcare_Clinic_Customizer_Customcontrol_Switch( $wp_customize, 'healthcare_clinic_about_show_hide', array( 'settings' => 'healthcare_clinic_about_show_hide', 'section' => 'healthcare_clinic_middle_section', 'label' => __( 'Check To show Section', 'healthcare-clinic' ), 'choices' => array( '1' => __( 'On', 'healthcare-clinic' ), 'off' => __( 'Off', 'healthcare-clinic' ), ), 'active_callback' => '', ) ) ); $healthcare_clinic_args = array('numberposts' => -1); $healthcare_clinic_post_list = get_posts($healthcare_clinic_args); $s = 0; $healthcare_clinic_pst_sls[]= __('Select','healthcare-clinic'); foreach ($healthcare_clinic_post_list as $key => $healthcare_clinic_p_post) { $healthcare_clinic_pst_sls[$healthcare_clinic_p_post->ID]=$healthcare_clinic_p_post->post_title; } for ( $s = 1; $s <= 3; $s++ ) { $wp_customize->add_setting('healthcare_clinic_mid_section_icon'.$s,array( 'default' => '', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control(new Healthcare_Clinic_Fontawesome_Icon_Chooser( $wp_customize,'healthcare_clinic_mid_section_icon'.$s,array( 'label' => __('Icon','healthcare-clinic').$s, 'transport' => 'refresh', 'section' => 'healthcare_clinic_middle_section', 'setting' => 'healthcare_clinic_mid_section_icon', 'type' => 'icon', ))); $wp_customize->add_setting('healthcare_clinic_middle_sec_settigs'.$s,array( 'sanitize_callback' => 'medical_care_sanitize_choices', )); $wp_customize->add_control('healthcare_clinic_middle_sec_settigs'.$s,array( 'type' => 'select', 'choices' => $healthcare_clinic_pst_sls, 'label' => __('Select post','healthcare-clinic').$s, 'section' => 'healthcare_clinic_middle_section', )); $wp_customize->selective_refresh->add_partial( 'healthcare_clinic_middle_sec_settigs'.$s, array( 'selector' => '#middle-sec i', 'render_callback' => 'medical_care_customize_partial_healthcare_clinic_middle_sec_settigs'.$s, ) ); } wp_reset_postdata(); //footer $wp_customize->add_setting('healthcare_clinic_footer_text',array( 'default' => 'Healthcare WordPress Theme', 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('healthcare_clinic_footer_text',array( 'label' => esc_html__('Copyright Text','healthcare-clinic'), 'section' => 'medical_care_footer_copyright', 'type' => 'textarea' )); $wp_customize->selective_refresh->add_partial( 'healthcare_clinic_footer_text', array( 'selector' => '.site-info a', 'render_callback' => 'medical_care_customize_partial_healthcare_clinic_footer_text', ) ); $wp_customize->add_setting('healthcare_clinic_primary_color', array( 'default' => '#1370b5', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'healthcare_clinic_primary_color', array( 'section' => 'colors', 'label' => esc_html__('Theme Color', 'healthcare-clinic'), ))); $wp_customize->add_setting('healthcare_clinic_service_bg', array( 'default' => '#f1f1f1', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'healthcare_clinic_service_bg', array( 'section' => 'colors', 'label' => esc_html__('service Box color', 'healthcare-clinic'), ))); $wp_customize->add_setting('healthcare_clinic_heading_color', array( 'default' => '#25304c', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'healthcare_clinic_heading_color', array( 'section' => 'colors', 'label' => esc_html__('Theme Heading Color', 'healthcare-clinic'), ))); $wp_customize->add_setting('healthcare_clinic_text_color', array( 'default' => '#666666', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'refresh', )); $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'healthcare_clinic_text_color', array( 'section' => 'colors', 'label' => esc_html__('Theme Text Color', 'healthcare-clinic'), ))); } add_action( 'customize_register', 'healthcare_clinic_customize' ); /* Pro control */ if (class_exists('WP_Customize_Control') && !class_exists('Healthcare_Clinic_Pro_Control')): class Healthcare_Clinic_Pro_Control extends WP_Customize_Control{ public function render_content(){?>