get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->add_setting('color_scheme', array( 'default' => '#00aeef', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'color_scheme',array( 'label' => __('Color Scheme','babycare'), 'description' => __('Select color from here.','babycare'), 'section' => 'colors', 'settings' => 'color_scheme' )) ); $wp_customize->add_setting('headerbg-color', array( 'default' => '#ffffff', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'headerbg-color',array( 'description' => __('Select background color for header.','babycare'), 'section' => 'colors', 'settings' => 'headerbg-color' )) ); $wp_customize->add_setting('firstbx-color', array( 'default' => '#00aeef', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'firstbx-color',array( 'description' => __('Select background color for first service box.','babycare'), 'section' => 'colors', 'settings' => 'firstbx-color' )) ); $wp_customize->add_setting('secondbx-color', array( 'default' => '#fb6eb5', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'secondbx-color',array( 'description' => __('Select background color for second service box.','babycare'), 'section' => 'colors', 'settings' => 'secondbx-color' )) ); $wp_customize->add_setting('thirdbx-color', array( 'default' => '#98cc4c', 'sanitize_callback' => 'sanitize_hex_color', )); $wp_customize->add_control( new WP_Customize_Color_Control($wp_customize,'thirdbx-color',array( 'description' => __('Select background color for third service box.','babycare'), 'section' => 'colors', 'settings' => 'thirdbx-color' )) ); // Slider Section Start $wp_customize->add_section( 'slider_section', array( 'title' => __('Slider Settings', 'babycare'), 'priority' => null, 'description' => __('Recommended image size (1420x567). Slider will work only when you select the static front page.','babycare'), ) ); $wp_customize->add_setting('page-setting7',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting7',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide one:','babycare'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting8',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting8',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide two:','babycare'), 'section' => 'slider_section' )); $wp_customize->add_setting('page-setting9',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting9',array( 'type' => 'dropdown-pages', 'label' => __('Select page for slide three:','babycare'), 'section' => 'slider_section' )); $wp_customize->add_setting('hide_slider',array( 'default' => true, 'sanitize_callback' => 'petcare_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_slider', array( 'settings' => 'hide_slider', 'section' => 'slider_section', 'label' => __('Check this to hide slider.','babycare'), 'type' => 'checkbox' )); // Slider Section End // Homepage Section Start $wp_customize->add_section( 'homepage_section', array( 'title' => __('Homepage Boxes', 'babycare'), 'priority' => null, 'description' => __('Select pages for homepage boxes. This section will be displayed only when you select the static front page.','babycare'), ) ); $wp_customize->add_setting('page-setting1',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting1',array( 'type' => 'dropdown-pages', 'label' => __('Select page for first box:','babycare'), 'section' => 'homepage_section' )); $wp_customize->add_setting('page-setting2',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting2',array( 'type' => 'dropdown-pages', 'label' => __('Select page for second box:','babycare'), 'section' => 'homepage_section' )); $wp_customize->add_setting('page-setting3',array( 'default' => '0', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'absint' )); $wp_customize->add_control('page-setting3',array( 'type' => 'dropdown-pages', 'label' => __('Select page for third box:','babycare'), 'section' => 'homepage_section' )); $wp_customize->add_setting('hide_section',array( 'default' => true, 'sanitize_callback' => 'petcare_lite_sanitize_checkbox', 'capability' => 'edit_theme_options', )); $wp_customize->add_control( 'hide_section', array( 'settings' => 'hide_section', 'section' => 'homepage_section', 'label' => __('Check this to hide section.','babycare'), 'type' => 'checkbox' )); } add_action( 'customize_register', 'petcare_lite_customize_register' ); function petcare_lite_css(){ ?>