get_setting( 'blogname' )->bizzcorp_lite = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->bizzcorp_lite = 'postMessage'; $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.site-name-desc a', 'render_callback' => 'bizzcorp-lite_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-name-desc p', 'render_callback' => 'bizzcorp-lite_customize_partial_blogdescription', ) ); /*======================== == Theme Colors Start ========================*/ $wp_customize->add_setting('color_scheme', array( 'default' => '#1a7dd7', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'color_scheme',array( 'label' => __('Color Scheme','bizzcorp-lite'), 'description' => __('Select theme main color from here.','bizzcorp-lite'), 'section' => 'colors', 'settings' => 'color_scheme' )) ); $wp_customize->add_setting('bizzcorp_headerbg-color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bizzcorp_headerbg-color',array( 'label' => __('Header Background Color','bizzcorp-lite'), 'description' => __('Select background color for header.','bizzcorp-lite'), 'section' => 'colors', 'settings' => 'bizzcorp_headerbg-color' )) ); $wp_customize->add_setting('bizzcorp_footer-color', array( 'default' => '#0a0a0a', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'bizzcorp_footer-color',array( 'label' => __('Footer Background Color','bizzcorp-lite'), 'description' => __('Select background color for footer.','bizzcorp-lite'), 'section' => 'colors', 'settings' => 'bizzcorp_footer-color' )) ); /*======================== == Theme Colors End ========================*/ /*======================== == Header Info Start ========================*/ $wp_customize->add_section( 'bizzcorp_head_info', array( 'title' => __('Setting Up Header Information', 'bizzcorp-lite'), 'priority' => null, 'description' => __('Setup header information here.','bizzcorp-lite'), ) ); $wp_customize->add_setting('bizzcorp_headinfo_phone',array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_phone',array( 'type' => 'text', 'label' => __('Add Phone Number here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_add',array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_add',array( 'type' => 'text', 'label' => __('Add Address here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_mail',array( 'sanitize_callback' => 'sanitize_text_field', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_mail',array( 'type' => 'text', 'label' => __('Add Email Address here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_fb',array( 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_fb',array( 'type' => 'url', 'label' => __('Add facebook url here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_tw',array( 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_tw',array( 'type' => 'url', 'label' => __('Add twitter url here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_ins',array( 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_ins',array( 'type' => 'url', 'label' => __('Add instagram url here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_in',array( 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_in',array( 'type' => 'url', 'label' => __('Add linkedin url here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_gp',array( 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_gp',array( 'type' => 'url', 'label' => __('Add google plus url here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); $wp_customize->add_setting('bizzcorp_headinfo_yt',array( 'sanitize_callback' => 'esc_url_raw', 'transport' => 'refresh' )); $wp_customize->add_control('bizzcorp_headinfo_yt',array( 'type' => 'url', 'label' => __('Add youtube url here.','bizzcorp-lite'), 'section' => 'bizzcorp_head_info' )); /*======================== == Header Info End ========================*/ /*======================== == Slider Start ========================*/ $wp_customize->add_section( 'bizzcorp_theme_slider', array( 'title' => __('Setting Up Theme Slider', 'bizzcorp-lite'), 'priority' => null, 'description' => __('Recommended image size (1600x900). Slider will work only when you select the static front page.','bizzcorp-lite'), ) ); $wp_customize->add_setting('slidesmlttl',array( 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('slidesmlttl',array( 'type' => 'text', 'label' => __('Add sub title for all slides','bizzcorp-lite'), 'section' => 'bizzcorp_theme_slider' )); $wp_customize->add_setting('theme-slide1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('theme-slide1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide one:','bizzcorp-lite'), 'section' => 'bizzcorp_theme_slider' )); $wp_customize->add_setting('theme-slide2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('theme-slide2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide two:','bizzcorp-lite'), 'section' => 'bizzcorp_theme_slider' )); $wp_customize->add_setting('theme-slide3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('theme-slide3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide three:','bizzcorp-lite'), 'section' => 'bizzcorp_theme_slider' )); $wp_customize->add_setting('slide_read_more',array( 'default' => __('','bizzcorp-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('slide_read_more',array( 'label' => __('Add slider link button text.','bizzcorp-lite'), 'section' => 'bizzcorp_theme_slider', 'setting' => 'slide_read_more', 'type' => 'text' )); $wp_customize->add_setting('hide_theme_slider',array( 'default' => true, 'sanitize_callback' => 'bizzcorp_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_theme_slider', array( 'settings' => 'hide_theme_slider', 'section' => 'bizzcorp_theme_slider', 'label' => __('Check this to hide slider.','bizzcorp-lite'), 'type' => 'checkbox' )); /*======================== == Slider End ========================*/ /*======================== == First Section Start ========================*/ $wp_customize->add_section( 'bizzcorp_wedo_sec', array( 'title' => __('Setting Up What We Do Section', 'bizzcorp-lite'), 'priority' => null, 'description' => __('Select pages for setting up first / what we do section. This section will be displayed only when you select the static front page.','bizzcorp-lite'), ) ); $wp_customize->add_setting('bizzcorp_wedo1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizzcorp_wedo1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 1st column','bizzcorp-lite'), 'section' => 'bizzcorp_wedo_sec' )); $wp_customize->add_setting('bizzcorp_wedo2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizzcorp_wedo2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 2nd column','bizzcorp-lite'), 'section' => 'bizzcorp_wedo_sec' )); $wp_customize->add_setting('bizzcorp_wedo3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizzcorp_wedo3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for 3rd column','bizzcorp-lite'), 'section' => 'bizzcorp_wedo_sec' )); $wp_customize->add_setting('bizzcorp_wedo_hide',array( 'default' => true, 'sanitize_callback' => 'bizzcorp_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bizzcorp_wedo_hide', array( 'settings' => 'bizzcorp_wedo_hide', 'section' => 'bizzcorp_wedo_sec', 'label' => __('Check this to hide section.','bizzcorp-lite'), 'type' => 'checkbox' )); /*======================== == Second Section End ========================*/ /*======================== == fisrt Section Start ========================*/ $wp_customize->add_section( 'bizzcorp_intro_sec', array( 'title' => __('Setting Up Introduction Section', 'bizzcorp-lite'), 'priority' => null, 'description' => __('Select pages for setting up second / Introduction section. This section will be displayed only when you select the static front page.','bizzcorp-lite'), ) ); $wp_customize->add_setting('bizzcorp_intro_ttl',array( 'default' => __('','bizzcorp-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bizzcorp_intro_ttl',array( 'label' => __('Add sub title text here.','bizzcorp-lite'), 'section' => 'bizzcorp_intro_sec', 'setting' => 'bizzcorp_intro_ttl', 'type' => 'text' )); $wp_customize->add_setting('bizzcorp_intro',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('bizzcorp_intro',array( 'type' => 'dropdown-pages', 'label' => __('Select page for Introduction Section','bizzcorp-lite'), 'section' => 'bizzcorp_intro_sec' )); $wp_customize->add_setting('bizzcorp_intro_more',array( 'default' => __('','bizzcorp-lite'), 'sanitize_callback' => 'sanitize_text_field' )); $wp_customize->add_control('bizzcorp_intro_more',array( 'label' => __('Add Read More text here.','bizzcorp-lite'), 'section' => 'bizzcorp_intro_sec', 'setting' => 'bizzcorp_intro_more', 'type' => 'text' )); $wp_customize->add_setting('bizzcorp_intro_hide',array( 'default' => true, 'sanitize_callback' => 'bizzcorp_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'bizzcorp_intro_hide', array( 'settings' => 'bizzcorp_intro_hide', 'section' => 'bizzcorp_intro_sec', 'label' => __('Check this to hide section.','bizzcorp-lite'), 'type' => 'checkbox' )); /*======================== == First Section End ========================*/ } add_action( 'customize_register', 'bizzcorp_lite_customize_register' ); function bizzcorp_lite_css(){ ?>