get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_setting( 'background_color' )->transport = 'postMessage'; /* Add the logo section. */ $wp_customize->add_section( 'vssgroup_logo_upload', array( 'title' => esc_html__( 'Logo', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'logo' setting. */ $wp_customize->add_setting( 'logo_upload', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'logo_image', array( 'label' => esc_html__( 'Upload custom logo.', 'vssgroup' ), 'section' => 'vssgroup_logo_upload', 'settings' => 'logo_upload', ) ) ); /* Add the Favicon section. */ $wp_customize->add_section( 'vssgroup_favicon_upload', array( 'title' => esc_html__( 'Favicon', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'Favicon' setting. */ $wp_customize->add_setting( 'favicon_upload', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'favicon_image', array( 'label' => esc_html__( 'Upload custom favicon.', 'vssgroup' ), 'section' => 'vssgroup_favicon_upload', 'settings' => 'favicon_upload', ) ) ); /* Add the Recent blog Section. */ $wp_customize->add_section( 'vssgroup_blog_count', array( 'title' => esc_html__( 'Blog Count', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'Recent Blog Section' setting. */ $wp_customize->add_setting( 'blog_count', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'blog_count', array( 'label' => esc_html__( 'Give Your Blog Count.', 'vssgroup' ), 'section' => 'vssgroup_blog_count', 'settings' => 'blog_count', 'type' => 'text', ) ); /* Add the Recent Project Section. */ $wp_customize->add_section( 'vssgroup_port_count', array( 'title' => esc_html__( 'Portfolio Count', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'Recent Project Section' setting. */ $wp_customize->add_setting( 'port_count', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'port_count', array( 'label' => esc_html__( 'Give Your Portfolio Count.', 'vssgroup' ), 'section' => 'vssgroup_port_count', 'settings' => 'port_count', 'type' => 'text', ) ); /* Add the Social Connect Section. */ $wp_customize->add_section( 'vssgroup_social_connect_url', array( 'title' => esc_html__( 'Social Connect Url', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'Facebook Url' setting. */ $wp_customize->add_setting( 'facebook_url', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'facebook_url', array( 'label' => esc_html__( 'Give Your Facebook Url.', 'vssgroup' ), 'section' => 'vssgroup_social_connect_url', 'settings' => 'facebook_url', 'type' => 'text', ) ); /* Add the 'twitter_url' setting. */ $wp_customize->add_setting( 'twitter_url', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'twitter_url', array( 'label' => esc_html__( 'Give Your Twiiter Url.', 'vssgroup' ), 'section' => 'vssgroup_social_connect_url', 'settings' => 'twitter_url', 'type' => 'text', ) ); /* Add the 'Linkedin_url' setting. */ $wp_customize->add_setting( 'linkedin_url', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'linkedin_url', array( 'label' => esc_html__( 'Give Your Linkedin Url.', 'vssgroup' ), 'section' => 'vssgroup_social_connect_url', 'settings' => 'linkedin_url', 'type' => 'text', ) ); /* Add the Copyright Text Section. */ $wp_customize->add_section( 'vssgroup_footer_options', array( 'title' => esc_html__( 'Footer Options', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'Copyright Text' setting. */ $wp_customize->add_setting( 'copy_name', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'copy_name', array( 'label' => esc_html__( 'Copyright Text.', 'vssgroup' ), 'section' => 'vssgroup_footer_options', 'settings' => 'copy_name', 'type' => 'text', ) ); /* Add the 'Designed Company Url' setting. */ $wp_customize->add_setting( 'design_url', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'design_url', array( 'label' => esc_html__( 'Designed Company Url', 'vssgroup' ), 'section' => 'vssgroup_footer_options', 'settings' => 'design_url', 'type' => 'text', ) ); /* Add the 'Designed Company Url' setting. */ $wp_customize->add_setting( 'design_name', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( 'design_name', array( 'label' => esc_html__( 'Designed Company Name', 'vssgroup' ), 'section' => 'vssgroup_footer_options', 'settings' => 'design_name', 'type' => 'text', ) ); // Slider Image Work /* Add the Slider section. */ $wp_customize->add_section( 'vssgroup_slider_option', array( 'title' => esc_html__( 'Slider Options', 'vssgroup' ), 'priority' => 30, ) ); /* Add the 'Slider 1' setting. */ $wp_customize->add_setting( 'slider1_option', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider1_option', array( 'label' => esc_html__( 'Upload Slider Image.', 'vssgroup' ), 'section' => 'vssgroup_slider_option', 'settings' => 'slider1_option', ) ) ); /* Add the 'Slider 1' setting. */ $wp_customize->add_setting( 'slider2_option', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider2_option', array( 'label' => esc_html__( 'Upload Slider Image.', 'vssgroup' ), 'section' => 'vssgroup_slider_option', 'settings' => 'slider2_option', ) ) ); /* Add the 'Slider 1' setting. */ $wp_customize->add_setting( 'slider3_option', array( 'default' => '', 'sanitize_callback' => 'esc_url', 'capability' => 'edit_theme_options', 'type' => 'option', ) ); $wp_customize->add_control( new WP_Customize_Image_Control( $wp_customize, 'slider3_option', array( 'label' => esc_html__( 'Upload Slider Image.', 'vssgroup' ), 'section' => 'vssgroup_slider_option', 'settings' => 'slider3_option', ) ) ); } add_action( 'customize_register', 'vssgroup_customize_register' ); function vssgroup_customize_preview_js() { wp_enqueue_script( 'vssgroup_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20130508', true ); } add_action( 'customize_preview_init', 'vssgroup_customize_preview_js' );