selective_refresh->add_partial( 'blogname', array( 'selector' => '.logo-brand h1', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.logo-brand p', ) ); $wp_customize->selective_refresh->add_partial( 'realestate_logo', array( 'selector' => '.logo-brand a img', ) ); $wp_customize->add_panel( 'realestate_theme_option', array('title' => esc_html__( 'Home Options','is-realestate' ), 'priority' => 1 )); /** Default Settings */ $wp_customize->add_panel('wp_default_panel', array('priority' => 10, 'capability' => 'edit_theme_options', 'theme_supports' => '', 'title' => esc_html__( 'Default Settings', 'is-realestate' ), 'description' => esc_html__( 'Default section provided by WordPress customizer.', 'is-realestate' ), )); $wp_customize->get_section( 'title_tagline' )->panel = 'wp_default_panel'; $wp_customize->get_section( 'colors' )->panel = 'wp_default_panel'; $wp_customize->get_section( 'static_front_page' )->panel = 'wp_default_panel'; $wp_customize->get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'background_color' )->transport = 'refresh'; $wp_customize->add_setting( 'sitedescription', array('sanitize_callback'=>'realestate_sanitize_checkbox', 'capability'=>'edit_theme_options')); $wp_customize->add_control('sitedescription',array( 'type' => 'checkbox', 'label' => esc_html__('Hide Site Tagline','is-realestate'), 'section' => 'title_tagline', ) ); // general Settings start $wp_customize->add_section('general_sec', array('title' => esc_html__( 'General Options','is-realestate' ), 'panel'=>'realestate_theme_option', 'description' => esc_html__('Here you can manage General Options(Like:- Logo,Custom Css etc.)','is-realestate'), 'capability'=>'edit_theme_options', 'priority' => 32, )); $wp_customize->add_setting( 'realestate_logo', array( 'type' => 'theme_mod', 'default'=>$logo, 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'realestate_logoo', array( 'label' => __( 'your Logo', 'is-realestate' ), 'section' => 'general_sec', 'settings' => 'realestate_logo' ) ) ); // logo height width // $wp_customize->add_setting( 'real_logo_heigth', array( 'type' => 'theme_mod', 'default'=>102, 'sanitize_callback'=>'realestate_sanitize_text', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( new RealEstate_Customizer_Range_Value_Control( $wp_customize, 'logo_height', array( 'type' => 'range-value', 'section' => 'general_sec', 'settings' => 'real_logo_heigth', 'label' => __( 'Logo Height','is-realestate' ), 'input_attrs' => array( 'min' => 1, 'max' => 500, 'step' => 1, 'suffix' => 'px', //optional suffix ), ))); $wp_customize->add_setting( 'real_logo_width', array( 'type' => 'theme_mod', 'default'=>290, 'sanitize_callback'=>'realestate_sanitize_text', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( new RealEstate_Customizer_Range_Value_Control( $wp_customize, 'logo_width', array( 'type' => 'range-value', 'section' => 'general_sec', 'settings' => 'real_logo_width', 'label' => __('Logo Width','is-realestate' ), 'input_attrs' => array( 'min' => 1, 'max' => 310, 'step' => 1, 'suffix' => 'px', //optional suffix ), ))); // logo height width // $wp_customize->add_setting( 'real_search_box', array( 'type' => 'theme_mod', 'default'=>1, 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'real_search_box', array( 'label' => __( 'Enable Search Box on Homepage', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'general_sec', 'settings' => 'real_search_box', ) ); $wp_customize->selective_refresh->add_partial( 'real_search_box', array( 'selector' => '.select-products', ) ); $wp_customize->add_setting( 'real_sticky_head', array( 'type' => 'theme_mod', 'default'=>1, 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'real_sticky_header', array( 'label' => __( 'Enable sticky Header', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'general_sec', 'settings' => 'real_sticky_head', ) ); $wp_customize->add_setting( 'real_custom_css', array( 'default'=>'', 'type'=>'theme_mod', 'capability'=>'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text', ) ); $wp_customize->add_control( 'custom_css', array( 'label' => __( 'Custom CSS', 'is-realestate' ), 'type'=>'textarea', 'section' => 'general_sec', 'settings' => 'real_custom_css' ) ); /* Slider Section */ $wp_customize->add_section( 'slider_sec', array( 'title' => __('Theme Slider Options','is-realestate'), 'panel'=>'realestate_theme_option', 'description' => __('Here you can add slider images','is-realestate'), 'capability'=>'edit_theme_options', 'priority' => 36, 'active_callback' => 'is_front_page', ) ); $wp_customize->add_setting( 'slider_home', array( 'type' => 'theme_mod', 'default'=>1, 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'slider_home', array( 'label' => __( 'Enable Slider on Homepage', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'slider_sec', 'settings' => 'slider_home', ) ); $wp_customize->add_setting( 'real_slider_spd', array( 'type' => 'theme_mod', 'default'=>'3500', 'sanitize_callback'=>'realestate_sanitize_text', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'realestate_slider_speed', array( 'label' => __( 'Slider Speed Option', 'is-realestate' ), 'description' => 'Value will be in milliseconds', 'type'=>'number', 'section' => 'slider_sec', 'settings' => 'real_slider_spd', ) ); $wp_customize->add_setting( 'real_slide_image_1', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw', ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_image_1', array( 'selector' => '.home-slider img.slide-image', ) ); $wp_customize->add_setting( 'real_slide_image_2', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw' ) ); $wp_customize->add_setting( 'real_slide_image_3', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw', ) ); $wp_customize->add_setting( 'real_slide_title_1', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text' ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_title_1', array( 'selector' => '.slide-text.one h1', ) ); $wp_customize->add_setting( 'real_slide_title_2', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text' ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_title_2', array( 'selector' => '.slide-text.two h1', ) ); $wp_customize->add_setting( 'real_slide_title_3', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text' ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_title_3', array( 'selector' => '.slide-text.three h1', ) ); $wp_customize->add_setting( 'slide_desc_1', array( 'type' => 'theme_mod', 'default'=>'', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' )); $wp_customize->selective_refresh->add_partial( 'slide_desc_1', array( 'selector' => '.slide-text.one p', ) ); $wp_customize->selective_refresh->add_partial( 'slide_desc_2', array( 'selector' => '.slide-text.two p', ) ); $wp_customize->selective_refresh->add_partial( 'slide_desc_3', array( 'selector' => '.slide-text.three p', ) ); $wp_customize->add_setting( 'slide_desc_2', array( 'type' => 'theme_mod', 'default'=>'', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' )); $wp_customize->add_setting( 'slide_desc_3', array( 'type' => 'theme_mod', 'default'=>'', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' )); $wp_customize->add_setting( 'real_slide_link_1', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw' ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_link_1', array( 'selector' => '.slide-text.one a', ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_link_2', array( 'selector' => '.slide-text.two a', ) ); $wp_customize->selective_refresh->add_partial( 'real_slide_link_3', array( 'selector' => '.slide-text.three a', ) ); $wp_customize->add_setting( 'real_slide_link_2', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw' ) ); $wp_customize->add_setting( 'real_slide_link_3', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'esc_url_raw' ) ); $wp_customize->add_setting( 'real_buttun_text-1', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text' ) ); $wp_customize->add_setting( 'real_buttun_text-2', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text' ) ); $wp_customize->add_setting( 'real_buttun_text-3', array( 'type' => 'theme_mod', 'default'=>'', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'realestate_slider_image_1', array( 'label' => __( 'Slider Image One', 'is-realestate' ), 'section' => 'slider_sec', 'settings' => 'real_slide_image_1' ) ) ); $wp_customize->add_control( 'real_slide_title_1', array( 'label' => __( 'Slider title one', 'is-realestate' ), 'type'=>'text', 'section' => 'slider_sec', 'settings' => 'real_slide_title_1' ) ); $wp_customize->add_control(new RealEstate_One_Page_Editor ($wp_customize, 'slide_desc_1', array( 'label' => __( 'Slider description one', 'is-realestate' ), 'active_callback' => 'show_on_front', 'include_admin_print_footer' => true, 'section' => 'slider_sec', 'settings' => 'slide_desc_1' ))); $wp_customize->add_control( 'realestate_slide_btnlink_1', array( 'label' => __( 'Slider Button Link', 'is-realestate' ), 'type'=>'url', 'section' => 'slider_sec', 'settings' => 'real_slide_link_1' ) ); $wp_customize->add_control( 'real_button_1', array( 'label' => __( 'Slider Button Text One', 'is-realestate' ), 'type'=>'text', 'section' => 'slider_sec', 'settings' => 'real_buttun_text-1' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'realestate_slider_image_2', array( 'label' => __( 'Slider Image Two ', 'is-realestate' ), 'section' => 'slider_sec', 'settings' => 'real_slide_image_2' ) ) ); $wp_customize->add_control( 'realestate_slide_title_2', array( 'label' => __( 'Slider Title Two', 'is-realestate' ), 'type'=>'text', 'section' => 'slider_sec', 'settings' => 'real_slide_title_2' ) ); $wp_customize->add_control(new RealEstate_One_Page_Editor ($wp_customize,'slide_desc_2', array( 'label' => __( 'Slider description Two', 'is-realestate' ), 'active_callback' => 'show_on_front', 'include_admin_print_footer' => true, 'section' => 'slider_sec', 'settings' => 'slide_desc_2' ))); $wp_customize->add_control( 'realestate_slide_btnlink_2', array( 'label' => __( 'Slider Link Two', 'is-realestate' ), 'type'=>'url', 'section' => 'slider_sec', 'settings' => 'real_slide_link_2' ) ); $wp_customize->add_control( 'real_button_2', array( 'label' => __( 'Slider Button Text Two', 'is-realestate' ), 'type'=>'text', 'section' => 'slider_sec', 'settings' => 'real_buttun_text-2' ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'realestate_slider_image_3', array( 'label' => __( 'Slider Image Three', 'is-realestate' ), 'section' => 'slider_sec', 'settings' => 'real_slide_image_3' ) ) ); $wp_customize->add_control( 'realestate_slide_title_3', array( 'label' => __( 'Slider Title Three', 'is-realestate' ), 'type'=>'text', 'section' => 'slider_sec', 'settings' => 'real_slide_title_3' ) ); $wp_customize->add_control(new RealEstate_One_Page_Editor ($wp_customize,'slide_desc_3', array( 'label' => __( 'Slider description Three', 'is-realestate' ), 'active_callback' => 'show_on_front', 'include_admin_print_footer' => true, 'section' => 'slider_sec', 'settings' => 'slide_desc_3' ))); $wp_customize->add_control( 'realestate_slide_btnlink_3', array( 'label' => __( 'Slider Button Link Three', 'is-realestate' ), 'type'=>'url', 'section' => 'slider_sec', 'settings' => 'real_slide_link_3' ) ); $wp_customize->add_control( 'real_button_3', array( 'label' => __( 'Slider Button Text Three', 'is-realestate' ), 'type'=>'text', 'section' => 'slider_sec', 'settings' => 'real_buttun_text-3' ) ); /* Blog Option */ $wp_customize->add_section('blog_section',array( 'title'=>__("Home Blog Options","is-realestate"), 'panel'=>'realestate_theme_option', 'capability'=>'edit_theme_options', 'priority' => 40 )); $wp_customize->add_setting( 'blog_home', array( 'type' => 'theme_mod', 'default'=>1, 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability' => 'edit_theme_options' ) ); $wp_customize->add_control( 'real_show_blog', array( 'label' => __( 'Enable Blog on Home', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'blog_section', 'settings' => 'blog_home' ) ); $wp_customize->add_setting( 'real_blog_title', array( 'default'=>'Our Blogs', 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' ) ); $wp_customize->selective_refresh->add_partial( 'real_blog_title', array( 'selector' => '.our-latest-news .section-titel', ) ); $wp_customize->add_control( 'realestate_blog_title', array( 'label' => __( 'Home Blog Title', 'is-realestate' ), 'type'=>'text', 'section' => 'blog_section', 'settings' => 'real_blog_title' ) ); $wp_customize->add_setting( 'real_blog_desc', array( 'default'=>'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' ) ); $wp_customize->selective_refresh->add_partial( 'real_blog_desc', array( 'selector' => '.our-latest-news .section-titel p', ) ); $wp_customize->add_control( 'realestate_blog_desc', array( 'label' => __( 'Home Blog Description', 'is-realestate' ), 'type'=>'textarea', 'section' => 'blog_section', 'settings' => 'real_blog_desc' ) ); $wp_customize->add_setting( 'real_excerpt_length', array( 'default'=>30, 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_integer', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'excerpt_blog', array( 'label' => __( 'Excerpt length blog section', 'is-realestate' ), 'type'=>'number', 'section' => 'blog_section', 'description' => esc_html__('Excerpt length only for home blog section.', 'is-realestate'), 'settings' => 'real_excerpt_length' ) ); /* Properties Section */ $wp_customize->add_section( 'property_section', array( 'title' => __('Properties Options','is-realestate'), 'description' => __('Here you can add Property title,description and even Properties','is-realestate'), 'panel'=>'realestate_theme_option', 'capabilit'=>'edit_theme_options', 'priority' => 39, ) ); $wp_customize->add_setting( 'property_home', array( 'type' => 'theme_mod', 'default'=>1, 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'property_home', array( 'label' => __( 'Enable Properties on Homepage', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'property_section', 'settings' => 'property_home', ) ); $wp_customize->selective_refresh->add_partial( 'property_home', array( 'selector' => '.featured-roperty', ) ); $wp_customize->add_setting( 'real_propert_title', array( 'type' => 'theme_mod', 'default'=>'Latest Properties', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text', ) ); $wp_customize->selective_refresh->add_partial( 'real_propert_title', array( 'selector' => '.featured-roperty .section-titel', ) ); $wp_customize->add_setting( 'real_propert_desc', array( 'type' => 'theme_mod', 'default'=>'Lorem Ipsum is simply dummy text of the printing and typesetting industry.', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text', ) ); $wp_customize->selective_refresh->add_partial( 'real_propert_desc', array( 'selector' => '.featured-roperty .section-titel p', ) ); $wp_customize->add_control( 'real_propert_titlee', array( 'label' => __( 'Properties section Heading', 'is-realestate' ), 'type'=>'text', 'section' => 'property_section', 'settings' => 'real_propert_title' ) ); $wp_customize->add_control( 'real_propert_descc', array( 'label' => __( 'Properties section description', 'is-realestate' ), 'type'=>'textarea', 'section' => 'property_section', 'settings' => 'real_propert_desc' ) ); $wp_customize->add_setting( 'real_propert_shortcode', array( 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text', ) ); $wp_customize->selective_refresh->add_partial( 'real_propert_shortcode', array( 'selector' => '.property_hive_shortcode', ) ); $wp_customize->add_control( 'real_propert_titlee', array( 'label' => __( 'Property Hive shortcode', 'is-realestate' ), 'type'=>'text', 'section' => 'property_section', 'settings' => 'real_propert_shortcode' ) ); /* Social options */ $wp_customize->add_section('social_section',array( 'title'=>__("Social Options","is-realestate"), 'panel'=>'realestate_theme_option', 'capability'=>'edit_theme_options', 'priority' => 42 )); $wp_customize->add_setting( 'header_social', array( 'default'=>1, 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability'=>'edit_theme_options' ) ); $wp_customize->selective_refresh->add_partial( 'header_social', array( 'selector' => '.top-social-icon-inner', ) ); $wp_customize->add_control( 'header_social_media_in_enabled', array( 'label' => __( 'Enable Social Media Icons in Header', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'social_section', 'settings' => 'header_social' ) ); $wp_customize->add_setting( 'footer_social', array( 'default'=>1, 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_checkbox', 'capability'=>'edit_theme_options' ) ); $wp_customize->selective_refresh->add_partial( 'footer_social', array( 'selector' => '.social-section', ) ); $wp_customize->add_control( 'footer_section_social_media_enbled', array( 'label' => __( 'Enable Social Media Icons in Footer', 'is-realestate' ), 'type'=>'checkbox', 'section' => 'social_section', 'settings' => 'footer_social' ) ); $wp_customize->add_setting( 'twitter_link', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'twitter_linkk', array( 'label' => __('Twitter', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'twitter_link' ) ); $wp_customize->add_setting( 'facebook_link', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'facebook_linkk', array( 'label' => __( 'Facebook', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'facebook_link' ) ); $wp_customize->add_setting( 'linkedin_link', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'linkedin_linkk', array( 'label' => __( 'LinkedIn', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'linkedin_link' ) ); $wp_customize->add_setting( 'youtube_link', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'youtube_linkk', array( 'label' => __( 'Youtube_link', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'youtube_link' ) ); $wp_customize->add_setting( 'google_plus', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'google_pluss', array( 'label' => __( 'Goole+', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'google_plus' ) ); $wp_customize->add_setting( 'rss_link', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'rss_linkk', array( 'label' => __( 'rss_link', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'rss_link' ) ); $wp_customize->add_setting( 'flicker_link', array( 'default'=>'', 'type'=>'theme_mod', 'sanitize_callback'=>'esc_url_raw', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'flicker_linkk', array( 'label' => __( 'flicker_link', 'is-realestate' ), 'type'=>'url', 'section' => 'social_section', 'settings' => 'flicker_link' ) ); $wp_customize->add_setting( 'real_email', array( 'default'=>'', 'type'=>'theme_mod', 'capability'=>'edit_theme_options', 'sanitize_callback'=>'is_email', ) ); $wp_customize->selective_refresh->add_partial( 'real_email', array( 'selector' => '.real_email', ) ); $wp_customize->add_control( 'contact_email', array( 'label' => __( 'Email-ID', 'is-realestate' ), 'type'=>'email', 'section' => 'social_section', 'settings' => 'real_email' ) ); $wp_customize->add_setting( 'real_phone', array( 'default'=>'', 'type'=>'theme_mod', 'capability'=>'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_integer', ) ); $wp_customize->selective_refresh->add_partial( 'real_phone', array( 'selector' => '.real_phone', ) ); $wp_customize->add_control( 'real_phone', array( 'label' => __( 'Phone Number', 'is-realestate' ), 'type'=>'text', 'section' => 'social_section', 'sanitize_callback'=>'realestate_sanitize_text', 'settings' => 'real_phone' ) ); $wp_customize->add_setting( 'real_address', array( 'default'=>'', 'type'=>'theme_mod', 'capability'=>'edit_theme_options', 'sanitize_callback'=>'realestate_sanitize_text', ) ); $wp_customize->selective_refresh->add_partial( 'real_phone', array( 'selector' => '.real_address', ) ); $wp_customize->add_control( 'address', array( 'label' => __( 'Address', 'is-realestate' ), 'type'=>'textarea', 'section' => 'social_section', 'sanitize_callback'=>'realestate_sanitize_text', 'settings' => 'real_address' ) ); /* Footer Options */ $wp_customize->add_section('footer_section',array( 'title'=>__("Footer Options","is-realestate"), 'panel'=>'realestate_theme_option', 'capability'=>'edit_theme_options', 'priority' => 50, )); $wp_customize->add_setting( 'real_footer_customization', array( 'default'=>'Proudly Developed By', 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' ) ); $wp_customize->selective_refresh->add_partial( 'real_footer_customization', array( 'selector' => '.container-fluid', ) ); $wp_customize->add_control( 'real_footer_customizationn', array( 'label' => __( 'Footer Customization Text', 'is-realestate' ), 'type'=>'text', 'section' => 'footer_section', 'settings' => 'real_footer_customization' ) ); $wp_customize->add_setting( 'real_develop_by', array( 'default'=>'Infigo Software', 'type'=>'theme_mod', 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control( 'real_develop_byy', array( 'label' => __( 'Footer developed by Text', 'is-realestate' ), 'type'=>'text', 'section' => 'footer_section', 'settings' => 'real_develop_by' ) ); $wp_customize->add_setting( 'real_deve_link', array( 'default'=>'www.infigosoftware.in', 'type'=>'theme_mod', 'capability'=>'edit_theme_options', 'sanitize_callback'=>'esc_url_raw' ) ); // home layout // $wp_customize->add_section('Home_Page_Layout',array( 'title'=>__("Front Page Layout",'is-realestate'), 'panel'=>'realestate_theme_option', 'capability'=>'edit_theme_options', 'priority' => 90, )); $wp_customize->add_setting('home_reorder', array( 'type'=>'theme_mod', 'sanitize_callback' => 'realestate_sanitize_json_string', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control(new RealEstate_Custom_sortable_Control($wp_customize,'home_reorder', array( 'label'=>__( 'Front Page Layout Option', 'is-realestate' ), 'section' => 'Home_Page_Layout', 'type' => 'home-sortable', 'choices' => array( 'property' => __('Home Properties', 'is-realestate'), 'blog' => __('Home Blog', 'is-realestate'), ), 'settings'=>'home_reorder', ))); // home layout close // $wp_customize->add_control( 'real_deve_linkk', array( 'label' => __( 'Footer developed by link', 'is-realestate' ), 'type'=>'url', 'section' => 'footer_section', 'settings' => 'real_deve_link' ) ); $wp_customize->add_section('documentation_section',array( 'title'=>__("Documentation","is-realestate"), 'panel'=>'realestate_theme_option', 'capability'=>'edit_theme_options', 'priority' => 50, )); $wp_customize->add_setting( 'documentation', array( 'sanitize_callback'=>'realestate_sanitize_text', 'capability'=>'edit_theme_options' ) ); $wp_customize->add_control(new RealEstate_documentaion($wp_customize, 'doc', array( 'section' => 'documentation_section', 'settings' => 'documentation' ) )); //sanitize callbacks function realestate_sanitize_text( $input ) { return wp_kses_post( force_balance_tags( $input ) ); } function realestate_sanitize_checkbox( $input ) { if ( $input == 1 ) { return 1 ; } else { return 0; } } function realestate_sanitize_integer( $input ) { return absint(($input)); } function realestate_sanitize_json_string($json){ $sanitized_value = array(); foreach (json_decode($json,true) as $value) { $sanitized_value[] = esc_attr($value); } return json_encode($sanitized_value); } } if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'RealEstate_Custom_sortable_Control' ) ) : class RealEstate_Custom_sortable_Control extends WP_Customize_Control { public $type = 'home-sortable'; /*Enqueue resources for the control*/ public function enqueue() { wp_enqueue_style('customizer-repeater-admin-stylesheet', get_template_directory_uri() . '/assets/customizer_js_css/css/is-realestate-admin-style.css', time()); wp_enqueue_script('customizer-repeater-script', get_template_directory_uri() . '/assets/customizer_js_css/js/is-realestate-customizer_repeater.js', array('jquery', 'jquery-ui-draggable'), time(), true); } public function render_content() { if (empty($this->choices)) { return; } $values = json_decode($this->value()); $name = $this->id; ?> label); ?> description)): ?> description); ?>
choices[$value]; ?>
choices as $value => $label): ?>
link());?> class="customizer-repeater-colector" value=""/> link());?> class="customizer-repeater-colector"/>
include_admin_print_footer = $args['include_admin_print_footer']; } if ( ! empty( $args['teeny'] ) ) { $this->teeny = $args['teeny']; } } /* Enqueue scripts */ public function enqueue() { wp_enqueue_script( 'one_lite_text_editor', get_template_directory_uri() . '/inc/customizer-page-editor/js/one-lite-text-editor.js', array( 'jquery' ), false, true ); } /* Render the content on the theme customizer page */ public function render_content() { ?> label ); ?> link(); ?> value="value() ); ?>"> $this->id, 'teeny' => $this->teeny, ); $control_content = $this->value(); wp_editor( $control_content, $this->id, $settings ); if ( $this->include_admin_print_footer === true ) { do_action( 'admin_print_footer_scripts' ); } } } endif; function show_on_front() { if(is_front_page()) { return is_front_page() && 'posts' !== get_option( 'show_on_front' ); } elseif(is_home()) { return is_home(); } } if ( class_exists( 'WP_Customize_Control' ) && ! class_exists( 'RealEstate_Customizer_Range_Value_Control' ) ) : class RealEstate_Customizer_Range_Value_Control extends WP_Customize_Control { public $type = 'range-value'; // Enqueue scripts/styles. public function enqueue() { wp_enqueue_script( 'customizer-range-value-control', get_stylesheet_directory_uri() . '/js/customizer-range-value-control.js', array( 'jquery' ), rand(), true ); wp_enqueue_style( 'customizer-range-value-control', get_stylesheet_directory_uri() . '/assets/css/customizer-range-value-control.css', array(), rand() ); } public function render_content() { ?>