get_setting( 'blogname' )->bizworld_lite = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->bizworld_lite = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-title a', 'render_callback' => 'bizworld-lite_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-title p', 'render_callback' => 'bizworld-lite_customize_partial_blogdescription', ) ); $wp_customize->add_setting('bizz_headerbg-color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bizz_headerbg-color',array( 'label' => __('Header Background color','bizworld-lite'), 'description' => __('Select background color for header.','bizworld-lite'), 'section' => 'colors', 'settings' => 'bizz_headerbg-color' )) ); $wp_customize->add_setting('bizz_color_scheme', array( 'default' => '#ff7659', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bizz_color_scheme',array( 'label' => __('Color Scheme','bizworld-lite'), 'description' => __('Select theme main color from here.','bizworld-lite'), 'section' => 'colors', 'settings' => 'bizz_color_scheme' )) ); $wp_customize->add_setting('bizz_footer-color', array( 'default' => '#151515', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bizz_footer-color',array( 'label' => __('Footer Background color','bizworld-lite'), 'description' => __('Select background color for footer.','bizworld-lite'), 'section' => 'colors', 'settings' => 'bizz_footer-color' )) ); /****************************************************** ** Top Header Section ******************************************************/ $wp_customize->add_section('bizz_top_head',array( 'title' => __('Top Header', 'bizworld-lite'), 'priority' => null, 'description' => __('Add top header information here which appears at top of the theme.','bizworld-lite'), )); $wp_customize->add_setting('bizz_top_head_add',array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' )); $wp_customize->add_control('bizz_top_head_add',array( 'type' => 'text', 'label' => __('Add Address here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_mail',array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' )); $wp_customize->add_control('bizz_top_head_mail',array( 'type' => 'text', 'label' => __('Add Email Address here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_phn',array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' )); $wp_customize->add_control('bizz_top_head_phn',array( 'type' => 'text', 'label' => __('Add Phone Number here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_fb',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('bizz_top_head_fb',array( 'type' => 'url', 'label' => __('Add Facebook link here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_tw',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('bizz_top_head_tw',array( 'type' => 'url', 'label' => __('Add Twitter link here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_in',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('bizz_top_head_in',array( 'type' => 'url', 'label' => __('Add Instagram link here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_link',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('bizz_top_head_link',array( 'type' => 'url', 'label' => __('Add Linkedin link here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('bizz_top_head_yt',array( 'sanitize_callback' => 'esc_url_raw' )); $wp_customize->add_control('bizz_top_head_yt',array( 'type' => 'url', 'label' => __('Add youtube link here.','bizworld-lite'), 'section' => 'bizz_top_head' )); $wp_customize->add_setting('hide_top_head',array( 'default' => true, 'sanitize_callback' => 'bizworld_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_top_head', array( 'settings' => 'hide_top_head', 'section' => 'bizz_top_head', 'label' => __('Check this to hide top header.','bizworld-lite'), 'type' => 'checkbox' )); /****************************************************** ** Theme Slider ******************************************************/ $wp_customize->add_section('bizz_slider',array( 'title' => __('Setting Up Slider', 'bizworld-lite'), 'priority' => null, 'description' => __('Recommended image size (1600x775). Slider will work only when you select the static front page.','bizworld-lite'), )); $wp_customize->add_setting('bizz_slider_sbttl',array( 'default' => __('','bizworld-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bizz_slider_sbttl',array( 'label' => __('Add slider sub title here.','bizworld-lite'), 'section' => 'bizz_slider', 'setting' => 'bizz_slider_sbttl', 'type' => 'text' )); $wp_customize->add_setting('bizz-slide1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizz-slide1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide one:','bizworld-lite'), 'section' => 'bizz_slider' )); $wp_customize->add_setting('bizz-slide2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizz-slide2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide two:','bizworld-lite'), 'section' => 'bizz_slider' )); $wp_customize->add_setting('bizz-slide3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizz-slide3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide three:','bizworld-lite'), 'section' => 'bizz_slider' )); $wp_customize->add_setting('bizz_slide_more',array( 'default' => __('','bizworld-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bizz_slide_more',array( 'label' => __('Add slider button text.','bizworld-lite'), 'section' => 'bizz_slider', 'setting' => 'bizz_slide_more', 'type' => 'text' )); $wp_customize->add_setting('hide_slider',array( 'default' => true, 'sanitize_callback' => 'bizworld_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_slider', array( 'settings' => 'hide_slider', 'section' => 'bizz_slider', 'label' => __('Check this to hide slider.','bizworld-lite'), 'type' => 'checkbox' )); /****************************************************** ** Theme First Section ******************************************************/ $wp_customize->add_section('bizz_abt_sec',array( 'title' => __('Setting Up About Us Section', 'bizworld-lite'), 'priority' => null, 'description' => __('Select page to display About Us section on homepage. This section will be displayed only when you select the static front page.','bizworld-lite'), )); $wp_customize->add_setting('bizz_abt_sbttl',array( 'default' => __('','bizworld-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bizz_abt_sbttl',array( 'label' => __('Add section sub title here.','bizworld-lite'), 'section' => 'bizz_abt_sec', 'setting' => 'bizz_abt_sbttl', 'type' => 'text' )); $wp_customize->add_setting('bizz_about_page',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizz_about_page',array( 'type' => 'dropdown-pages', 'label' => __('Select page for About Us Section','bizworld-lite'), 'section' => 'bizz_abt_sec' )); $wp_customize->add_setting('about_more',array( 'default' => __('','bizworld-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('about_more',array( 'label' => __('Add Read More button text.','bizworld-lite'), 'section' => 'bizz_abt_sec', 'setting' => 'about_more', 'type' => 'text' )); $wp_customize->add_setting('bizz_hide_about',array( 'default' => true, 'sanitize_callback' => 'bizworld_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bizz_hide_about', array( 'settings' => 'bizz_hide_about', 'section' => 'bizz_abt_sec', 'label' => __('Check this to hide about us section.','bizworld-lite'), 'type' => 'checkbox' )); /****************************************************** ** Theme Second Section ******************************************************/ $wp_customize->add_section('bizz_service_sec',array( 'title' => __('Setting Up Services Section', 'bizworld-lite'), 'priority' => null, 'description' => __('Select page to display services section on homepage. This section will be displayed only when you select the static front page.','bizworld-lite'), )); $wp_customize->add_setting('service_secttl',array( 'default' => __('','bizworld-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('service_secttl',array( 'label' => __('Add section title here.','bizworld-lite'), 'section' => 'bizz_service_sec', 'setting' => 'service_secttl', 'type' => 'text' )); $wp_customize->add_setting('ser1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('ser1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for first box','bizworld-lite'), 'section' => 'bizz_service_sec' )); $wp_customize->add_setting('ser2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('ser2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for second box','bizworld-lite'), 'section' => 'bizz_service_sec' )); $wp_customize->add_setting('ser3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('ser3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for third box','bizworld-lite'), 'section' => 'bizz_service_sec' )); $wp_customize->add_setting('ser_more',array( 'default' => __('','bizworld-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('ser_more',array( 'label' => __('Add Read More button text.','bizworld-lite'), 'section' => 'bizz_service_sec', 'setting' => 'ser_more', 'type' => 'text' )); $wp_customize->add_setting('hide_service',array( 'default' => true, 'sanitize_callback' => 'bizworld_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_service', array( 'settings' => 'hide_service', 'section' => 'bizz_service_sec', 'label' => __('Check this to hide services section.','bizworld-lite'), 'type' => 'checkbox' )); } add_action( 'customize_register', 'bizworld_lite_customize_register' ); function bizworld_lite_css(){ ?>