/**
  * This function enqueues scripts and styles
  */
 public function enqueue()
 {
     // Protocol
     $protocol = is_ssl() ? 'https' : 'http';
     // Grab the SDS Theme Options instance
     $sds_theme_options_instance = SDS_Theme_Options_Instance();
     // Web Fonts
     if (function_exists('sds_web_fonts')) {
         $google_families = $sds_theme_options_instance->get_google_font_families_list();
         wp_enqueue_style('google-web-fonts', $protocol . '://fonts.googleapis.com/css?family=' . $google_families, false, SDS_Theme_Options::get_version());
     }
     // Call the parent enqueue method here
     parent::enqueue();
 }
Ejemplo n.º 2
0
    function me_wp_head()
    {
        $sds_theme_options_instance = SDS_Theme_Options_Instance();
        ?>
		<style type="text/css" id="<?php 
        echo $sds_theme_options_instance->get_parent_theme()->get_template();
        ?>
-theme-customizer">
			/* Content Color */
			.blog-post, .inner-block, .news-block, footer.post-footer, #post-author, .post-content {
				color: <?php 
        echo get_theme_mod('content_color');
        ?>
;
			}
		</style>
	<?php 
    }
Ejemplo n.º 3
0
function sds_customize_register($wp_customize)
{
    // Load custom Theme Customizer API assets
    require get_template_directory() . '/includes/class-sds-theme-options-customize-logo-control.php';
    // Logo Controller
    $sds_theme_options_instance = SDS_Theme_Options_Instance();
    $sds_theme_options_defaults = $sds_theme_options_instance->get_sds_theme_option_defaults();
    /**
     * Logo Upload
     */
    // Setting (data is sanitized upon update_option() call using the sanitize function in $sds_theme_options_instance)
    $wp_customize->add_setting('sds_theme_options[logo_attachment_id]', array('default' => $sds_theme_options_defaults['logo_attachment_id'], 'type' => 'option', 'sanitize_callback' => 'absint'));
    // Section - overwrite the default title_tagline section properties
    $wp_customize->get_section('title_tagline')->title = __('Logo/Site Title & Tagline', 'modern-estate');
    // Control
    $wp_customize->add_control(new SDS_Theme_Options_Customize_Logo_Control($wp_customize, 'logo_attachment_id', array('label' => __('Logo', 'modern-estate'), 'section' => 'title_tagline', 'settings' => 'sds_theme_options[logo_attachment_id]', 'sds_theme_options_instance' => $sds_theme_options_instance, 'type' => 'sds_theme_options_logo')));
    /**
     * Content Color
     */
    // Setting
    $wp_customize->add_setting('content_color', array('default' => apply_filters('theme_mod_content_color', ''), 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
    // Control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'content_color', array('label' => __('Content Color', 'modern-estate'), 'section' => 'colors', 'settings' => 'content_color')));
}
    function min_wp_head()
    {
        $sds_theme_options_instance = SDS_Theme_Options_Instance();
        ?>
		<style type="text/css" id="<?php 
        echo $sds_theme_options_instance->get_parent_theme()->get_template();
        ?>
-theme-customizer">
			/* Content Color */
			article.content, footer.post-footer, #post-author {
				color: <?php 
        echo get_theme_mod('content_color');
        ?>
;
			}
		</style>
	<?php 
    }
Ejemplo n.º 5
0
        {
            // Replace backslashes on Windows machines
            $template_dir = str_replace(array('\\\\', '\\'), '/', get_template_directory());
            $file_dir = str_replace(array('\\\\', '\\'), '/', dirname(__FILE__));
            return untrailingslashit($relative ? str_replace($template_dir, '', $file_dir) : $file_dir);
        }
        /**
         * This function returns the url for SDS Core without a trailing slash.
         */
        public static function sds_core_url()
        {
            return untrailingslashit(get_template_directory_uri() . self::sds_core_dir(true));
        }
        /**
         * This function returns a boolean result comparing against the current WordPress version.
         *
         * @return Boolean
         */
        public static function wp_version_compare($version, $operator = '>=')
        {
            global $wp_version;
            return version_compare($wp_version, $version, $operator);
        }
    }
    function SDS_Theme_Options_Instance()
    {
        return SDS_Theme_Options::instance();
    }
    // Instantiate SDS_Theme_Options
    SDS_Theme_Options_Instance();
}
Ejemplo n.º 6
0
 /**
  * This function stores data in our transient and returns the data.
  */
 public function set_transient()
 {
     $sds_theme_options_instance = SDS_Theme_Options_Instance();
     // Grab the SDS_Theme_Options instance
     $data = array();
     // Default
     // Always add the Customizer CSS
     $data['customizer_css'] = $this->get_customizer_css();
     // Always add the theme's version
     $data['version'] = $sds_theme_options_instance->theme->get('Version');
     // Set the transient
     set_transient($this->transient_name, $data);
     return $data;
 }
Ejemplo n.º 7
0
function sds_customize_register($wp_customize)
{
    // Load custom Customizer API assets
    include_once SDS_Theme_Options::sds_core_dir() . '/customizer/class-sds-theme-options-customize-checkbox-control.php';
    // Checkbox Controller
    include_once SDS_Theme_Options::sds_core_dir() . '/customizer/class-sds-theme-options-customize-color-scheme-control.php';
    // Color Scheme Controller
    include_once SDS_Theme_Options::sds_core_dir() . '/customizer/class-sds-theme-options-customize-content-layout-control.php';
    // Content Layout Controller
    include_once SDS_Theme_Options::sds_core_dir() . '/customizer/class-sds-theme-options-customize-logo-control.php';
    // Logo Controller
    include_once SDS_Theme_Options::sds_core_dir() . '/customizer/class-sds-theme-options-customize-web-font-control.php';
    // Web Font Controller
    include_once SDS_Theme_Options::sds_core_dir() . '/customizer/class-sds-theme-options-customize-us-control.php';
    // Upsell Controller
    // SDS Theme Options defaults
    $sds_theme_options_instance = SDS_Theme_Options_Instance();
    $sds_theme_options_defaults = $sds_theme_options_instance->get_sds_theme_option_defaults();
    /**
     * Logo Upload (WordPress 4.5 and up and if the theme supports WordPress' custom logo)
     */
    if (SDS_Theme_Options::wp_version_compare('4.5') && get_theme_support('custom-logo')) {
        /**
         * Custom Logo Control
         */
        if ($custom_logo_control = $wp_customize->get_control('custom_logo')) {
            // Get Control
            $sds_logo_dimensions = apply_filters('sds_theme_options_logo_dimensions', '300x100');
            $custom_logo_control->priority = 30;
            // Adjust priority
            $custom_logo_control->description = sprintf(__('Upload a logo to to replace the site title. Recommended dimensions: %1$s.', 'baton'), $sds_logo_dimensions);
            // Add description
        }
    }
    /**
     * Logo Upload (below WordPress 4.5 or if the theme doesn't support WordPress' custom logo)
     */
    if (SDS_Theme_Options::wp_version_compare('4.5', '<') || !get_theme_support('custom-logo')) {
        // Setting (data is sanitized upon update_option() call using the sanitize function in $sds_theme_options_instance)
        $wp_customize->add_setting('sds_theme_options[logo_attachment_id]', array('default' => $sds_theme_options_defaults['logo_attachment_id'], 'type' => 'option', 'sanitize_callback' => 'absint'));
        // Section - overwrite the default title_tagline section properties
        $wp_customize->get_section('title_tagline')->title = __('Logo/Site Title & Tagline', 'baton');
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Logo_Control($wp_customize, 'logo_attachment_id', array('label' => __('Logo', 'baton'), 'section' => 'title_tagline', 'settings' => 'sds_theme_options[logo_attachment_id]', 'type' => 'sds_theme_options_logo')));
    }
    /**
     * Show/Hide Elements
     */
    // Section
    $wp_customize->add_section('sds_theme_options_show_hide', array('priority' => 30, 'title' => __('Show or Hide Tagline', 'baton'), 'description' => __('Use this option to show or hide the tagline on your site.', 'baton')));
    /*
     * Show/Hide Tagline
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[hide_tagline]', array('default' => $sds_theme_options_defaults['hide_tagline'], 'type' => 'option', 'sanitize_callback' => 'sds_boolval'));
    // Control
    $wp_customize->add_control(new SDS_Theme_Options_Customize_Checkbox_Control($wp_customize, 'sds_theme_options[hide_tagline]', array('label' => __('Tagline', 'baton'), 'section' => 'sds_theme_options_show_hide', 'settings' => 'sds_theme_options[hide_tagline]', 'priority' => 10, 'type' => 'checkbox', 'css_class' => 'sds-theme-options-show-hide-tagline', 'css_id' => 'sds_theme_options_hide_tagline')));
    /**
     * Color Scheme (if specified by the theme)
     */
    if (function_exists('sds_color_schemes')) {
        // Setting
        $wp_customize->add_setting('sds_theme_options[color_scheme]', array('default' => $sds_theme_options_defaults['color_scheme'], 'type' => 'option', 'sanitize_callback' => 'sanitize_html_class'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Color_Scheme_Control($wp_customize, 'sds_theme_options[color_scheme]', array('label' => __('Color Scheme', 'baton'), 'description' => __('Select a color scheme to use on your site.', 'baton'), 'section' => 'colors', 'settings' => 'sds_theme_options[color_scheme]', 'priority' => 10, 'type' => 'radio', 'color_controls' => apply_filters('sds_color_scheme_customizer_color_controls', array('content_color'), $wp_customize))));
    }
    /**
     * Content Color
     */
    // Setting
    $wp_customize->add_setting('content_color', array('default' => apply_filters('theme_mod_content_color', ''), 'sanitize_callback' => 'sanitize_hex_color', 'sanitize_js_callback' => 'maybe_hash_hex_color'));
    // Control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'content_color', array('label' => __('Content Color', 'baton'), 'section' => 'colors', 'settings' => 'content_color', 'priority' => 20)));
    /*
     * Background Color (change priority)
     */
    $wp_customize->get_control('background_color')->priority = 30;
    // Move below content_color
    /**
     * Web Font (if specified by the theme)
     */
    if (function_exists('sds_web_fonts')) {
        // Section
        $wp_customize->add_section('fonts', array('priority' => 50, 'title' => __('Fonts', 'baton')));
        // Setting
        $wp_customize->add_setting('sds_theme_options[web_font]', array('default' => $sds_theme_options_defaults['web_font'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Web_Font_Control($wp_customize, 'sds_theme_options[web_font]', array('label' => __('Web Fonts', 'baton'), 'description' => __('Select a web font to use on your site.', 'baton'), 'section' => 'fonts', 'settings' => 'sds_theme_options[web_font]', 'priority' => 10, 'type' => 'radio')));
    }
    /**
     * Content Layouts
     */
    if (function_exists('sds_content_layouts')) {
        // Section
        $wp_customize->add_section('sds_theme_options_content_layouts', array('priority' => 70, 'title' => __('Content Layouts', 'baton'), 'description' => __('Control the layout of the content on your site here. Choose a global layout scheme to be used across your entire site or specify individual content type layout schemes by adjusting the options below.', 'baton')));
        /*
         * Global Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][global]', array('default' => $sds_theme_options_defaults['content_layouts']['global'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][global]', array('label' => __('Global Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied globally on your site. Select more specific content layouts below.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][global]', 'priority' => 10, 'type' => 'radio', 'content_layout_id' => 'global')));
        /*
         * Front Page Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][front_page]', array('default' => $sds_theme_options_defaults['content_layouts']['front_page'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][front_page]', array('label' => __('Front Page Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to the front page on your site (if selected in Settings &gt; Reading).', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][front_page]', 'priority' => 20, 'type' => 'radio', 'content_layout_id' => 'front_page', 'active_callback' => sds_is_front_page_sidebar_registered() ? 'sds_is_front_page_sidebar_inactive' : '')));
        /*
         * Home Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][home]', array('default' => $sds_theme_options_defaults['content_layouts']['home'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][home]', array('label' => __('Home Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to the blog on your site.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][home]', 'priority' => 30, 'type' => 'radio', 'content_layout_id' => 'home')));
        /*
         * Single Post Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][single]', array('default' => $sds_theme_options_defaults['content_layouts']['single'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][single]', array('label' => __('Single Post Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to single posts on your site.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][single]', 'priority' => 40, 'type' => 'radio', 'content_layout_id' => 'single')));
        /*
         * Single Page Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][page]', array('default' => $sds_theme_options_defaults['content_layouts']['page'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][page]', array('label' => __('Single Page Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to single pages on your site.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][page]', 'priority' => 50, 'type' => 'radio', 'content_layout_id' => 'page')));
        /*
         * Archive Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][archive]', array('default' => $sds_theme_options_defaults['content_layouts']['archive'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][archive]', array('label' => __('Archive Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to archives on your site.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][archive]', 'priority' => 60, 'type' => 'radio', 'content_layout_id' => 'archive')));
        /*
         * Category Archive Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][category]', array('default' => $sds_theme_options_defaults['content_layouts']['category'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][category]', array('label' => __('Category Archive Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to category archives on your site.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][category]', 'priority' => 70, 'type' => 'radio', 'content_layout_id' => 'category')));
        /*
         * Tag Archive Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][tag]', array('default' => $sds_theme_options_defaults['content_layouts']['tag'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][tag]', array('label' => __('Tag Archive Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to tag archives on your site.', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][tag]', 'priority' => 80, 'type' => 'radio', 'content_layout_id' => 'tag')));
        /*
         * 404 Error Content Layout
         */
        // Setting
        $wp_customize->add_setting('sds_theme_options[content_layouts][404]', array('default' => $sds_theme_options_defaults['content_layouts']['404'], 'type' => 'option', 'sanitize_callback' => 'sanitize_text_field'));
        // Control
        $wp_customize->add_control(new SDS_Theme_Options_Customize_Content_Layout_Control($wp_customize, 'sds_theme_options[content_layouts][404]', array('label' => __('404 Error Content Layout', 'baton'), 'description' => __('Select a content layout that will be applied to the 404 error page on your site. <strong>Please Note: The Customizer does not allow for previewing of 404 error pages.</strong>', 'baton'), 'section' => 'sds_theme_options_content_layouts', 'settings' => 'sds_theme_options[content_layouts][404]', 'priority' => 90, 'type' => 'radio', 'content_layout_id' => '404')));
    }
    /**
     * Social Media
     */
    // Section
    $wp_customize->add_section('sds_theme_options_social_media', array('priority' => 75, 'title' => __('Social Media', 'baton'), 'description' => __('Enter your social media links here. This section is used throughout the site to display social media links to visitors. Some themes display social media links automatically, and some only display them within the Social Media widget.', 'baton')));
    /*
     * Facebook
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][facebook_url]', array('default' => $sds_theme_options_defaults['social_media']['facebook_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][facebook_url]', array('label' => __('Facebook', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][facebook_url]', 'priority' => 10)));
    /*
     * Twitter
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][twitter_url]', array('default' => $sds_theme_options_defaults['social_media']['twitter_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][twitter_url]', array('label' => __('Twitter', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][twitter_url]', 'priority' => 20)));
    /*
     * LinkedIn
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][linkedin_url]', array('default' => $sds_theme_options_defaults['social_media']['linkedin_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][linkedin_url]', array('label' => __('LinkedIn', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][linkedin_url]', 'priority' => 30)));
    /*
     * Google+
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][google_plus_url]', array('default' => $sds_theme_options_defaults['social_media']['google_plus_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][google_plus_url]', array('label' => __('Google+', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][google_plus_url]', 'priority' => 40)));
    /*
     * YouTube
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][youtube_url]', array('default' => $sds_theme_options_defaults['social_media']['youtube_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][youtube_url]', array('label' => __('YouTube', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][youtube_url]', 'priority' => 50)));
    /*
     * Vimeo
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][vimeo_url]', array('default' => $sds_theme_options_defaults['social_media']['vimeo_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][vimeo_url]', array('label' => __('Vimeo', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][vimeo_url]', 'priority' => 60)));
    /*
     * Instagram
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][instagram_url]', array('default' => $sds_theme_options_defaults['social_media']['instagram_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][instagram_url]', array('label' => __('Instagram', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][instagram_url]', 'priority' => 70)));
    /*
     * Pinterest
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][pinterest_url]', array('default' => $sds_theme_options_defaults['social_media']['pinterest_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][pinterest_url]', array('label' => __('Pinterest', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][pinterest_url]', 'priority' => 80)));
    /*
     * Flickr
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][flickr_url]', array('default' => $sds_theme_options_defaults['social_media']['flickr_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][flickr_url]', array('label' => __('Flickr', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][flickr_url]', 'priority' => 90)));
    /*
     * Foursquare
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][foursquare_url]', array('default' => $sds_theme_options_defaults['social_media']['foursquare_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][foursquare_url]', array('label' => __('Foursquare', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][foursquare_url]', 'priority' => 100)));
    /*
     * RSS (Use Site RSS Feed)
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][rss_url_use_site_feed]', array('default' => $sds_theme_options_defaults['social_media']['rss_url_use_site_feed'], 'type' => 'option', 'sanitize_callback' => 'sds_boolval'));
    // Control
    $wp_customize->add_control(new SDS_Theme_Options_Customize_Checkbox_Control($wp_customize, 'sds_theme_options[social_media][rss_url_use_site_feed]', array('label' => __('RSS - Use Site RSS Feed', 'baton'), 'description' => __('When "yes" is displayed, the RSS feed for your site will be used. Otherwise, you can enter a custom RSS URL to use instead.', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][rss_url_use_site_feed]', 'priority' => 110, 'type' => 'checkbox', 'css_class' => 'sds-theme-options-rss-url-use-site-feed', 'css_id' => 'sds_theme_options_rss_url_use_site_feed', 'checked_label' => __('Yes', 'baton'), 'unchecked_label' => __('No', 'baton'), 'style' => array('before' => 'width: 35%; text-align: center;', 'after' => 'right: 0; width: 35%; padding: 0 6px; text-align: center;'), 'checkbox_type' => 'reverse')));
    /*
     * RSS (Custom RSS Feed)
     */
    // Setting
    $wp_customize->add_setting('sds_theme_options[social_media][rss_url]', array('default' => $sds_theme_options_defaults['social_media']['rss_url'], 'type' => 'option', 'sanitize_callback' => 'esc_url'));
    // Control
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'sds_theme_options[social_media][rss_url]', array('label' => __('RSS - Custom RSS Feed', 'baton'), 'section' => 'sds_theme_options_social_media', 'settings' => 'sds_theme_options[social_media][rss_url]', 'priority' => 120, 'active_callback' => 'sds_social_media_use_custom_rss_feed')));
}
 function get_customizer_css()
 {
     // Check transient first (not in the Customizer)
     if (!$this->is_customize_preview() && !empty($this->transient_data) && isset($this->transient_data['customizer_css'])) {
         return $this->transient_data['customizer_css'];
     } else {
         $sds_theme_options_instance = SDS_Theme_Options_Instance();
         // Open <style>
         $r = '<style type="text/css" id="' . $sds_theme_options_instance->get_parent_theme()->get_template() . '-customizer">';
         // If we have a body background color or image selected by the user
         if (!(get_theme_mod('background_color') || get_background_image())) {
             if ($background_css = $this->get_background_image_css()) {
                 $r .= '/* Body Background Image & Color */' . "\n";
                 $r .= 'body.custom-background {' . "\n";
                 $r .= $background_css . "\n";
                 $r .= '}' . "\n\n";
             }
         }
         // If we have a primary color selected by the user
         if ($theme_mod_primary_color = $this->get_theme_mod('primary_color', $this->theme_mod_primary_color())) {
             $r .= '/* Primary Color */' . "\n";
             $r .= 'a,' . "\n";
             $r .= 'nav.primary-nav-container ul:first-of-type li a:hover,' . "\n";
             $r .= '.block-3:hover .product-info h2, .block-3:hover .product-info p, .block-2:hover .calltoaction h2, .block-2:hover .post-info h2, .block-3:hover .post-info h2, .block-3:hover .post-info h2 a,' . "\n";
             $r .= '#front-page-sidebar .front-page-sidebar:hover a, .simple-shop-calltoaction .widget-content:hover p, #front-page-sidebar .front-page-sidebar.woocommerce ul.product_list_widget li a:hover, #front-page-sidebar .simple-shop-recent-posts > ul > li.has-image-placeholder:hover .post-image.post-image-placeholder .dashicons, #front-page-sidebar .simple-shop-recent-posts > ul > li:hover .post-info h2,' . "\n";
             $r .= '.full-post-container a, .post-container a,' . "\n";
             $r .= '.has-image-placeholder:hover .post-image a,' . "\n";
             $r .= '.sidebar a,' . "\n";
             $r .= 'div.summary section.product-info p.amount, button.single_add_to_cart_button:hover,' . "\n";
             $r .= 'footer#footer a, .woocommerce ul.products li a:hover,' . "\n";
             $r .= '.woocommerce .woocommerce-breadcrumb a, .woocommerce-page .woocommerce-breadcrumb a, .woocommerce .star-rating span, .woocommerce-page .star-rating span, .woocommerce div.product span.price, .woocommerce div.product p.price, .woocommerce #content div.product span.price, .woocommerce #content div.product p.price, .woocommerce-page div.product span.price, .woocommerce-page div.product p.price, .woocommerce-page #content div.product span.price, .woocommerce-page #content div.product p.price,' . "\n";
             $r .= '.woocommerce ul.products li:hover .post-image-placeholder .dashicons, .woocommerce li.product:hover h3, .woocommerce #content .product:hover h3, .woocommerce-page li.product:hover h3, .woocommerce-page #content .product:hover h3 {' . "\n";
             $r .= 'color: ' . $theme_mod_primary_color . ';' . "\n";
             $r .= '}' . "\n\n";
             $r .= '.more-link, .post-edit-link, input[type=submit], .post-container a.post-edit-link {' . "\n";
             $r .= 'background-color: ' . $theme_mod_primary_color . ';' . "\n";
             $r .= 'border-color: ' . $theme_mod_primary_color . ';' . "\n";
             $r .= '}' . "\n\n";
             $r .= 'nav.top-nav ul li:hover, nav.top-nav ul:first-child li a:hover, nav.primary-nav-container ul:first-of-type > li ul, .pagination ul li a:hover, article.widget-fullbody ul li a:hover, section.widget #searchform input.submit,' . "\n";
             $r .= 'aside.sidebar section.widget form.register input[type=submit], .widget .social-media-icons a, footer#footer .widget .social-media-icons a, #respond input[type="submit"], ul.newsletter-form li input[type=submit]:hover, .reply a:hover {' . "\n";
             $r .= 'background-color: ' . $theme_mod_primary_color . ';' . "\n";
             $r .= '}' . "\n\n";
             $r .= '.mc-gravity .gform_heading, .mc_gravity .gform_heading, .mc-newsletter .gform_heading, .mc_newsletter .gform_heading,' . "\n";
             $r .= '.mc-gravity_wrapper .gform_heading, .mc_gravity_wrapper .gform_heading, .mc-newsletter_wrapper .gform_heading, .mc_newsletter_wrapper .gform_heading,' . "\n";
             $r .= '.mc-gravity .gform_footer input.button, .mc_gravity .gform_footer input.button, .mc-newsletter .gform_footer input.button, .mc_newsletter .gform_footer input.button,' . "\n";
             $r .= '.mc-gravity_wrapper .gform_footer input.button, .mc_gravity_wrapper .gform_footer input.button, .mc-gravity-confirmation, .mc_gravity-confirmation, .mc-newsletter-confirmation, .mc_newsletter-confirmation {' . "\n";
             $r .= 'background: ' . $theme_mod_primary_color . ';' . "\n";
             $r .= '}' . "\n\n";
             $r .= '.woocommerce .product .add_to_cart_button, .woocommerce .cart input.button.checkout-button, .woocommerce #payment #place_order, .woocommerce-page #payment #place_order, .woocommerce #content .product .add_to_cart_button, .woocommerce-page .product .add_to_cart_button, .woocommerce-page #content .product .add_to_cart_button,' . "\n";
             $r .= '.woocommerce nav.woocommerce-pagination ul li a:hover, .woocommerce nav.woocommerce-pagination ul li a:focus, .woocommerce #content nav.woocommerce-pagination ul li a:hover, .woocommerce #content nav.woocommerce-pagination ul li a:focus, .woocommerce-page nav.woocommerce-pagination ul li a:hover, .woocommerce-page nav.woocommerce-pagination ul li a:focus, .woocommerce-page #content nav.woocommerce-pagination ul li a:hover, .woocommerce-page #content nav.woocommerce-pagination ul li a:focus,' . "\n";
             $r .= '.woocommerce .product .add_to_cart_button, .woocommerce #content .product .add_to_cart_button, .woocommerce-page .product .add_to_cart_button, .woocommerce-page #content .product .add_to_cart_button, .woocommerce div.product form.cart .button, .woocommerce #content div.product form.cart .button, .woocommerce-page div.product form.cart .button, .woocommerce-page #content div.product form.cart .button,' . "\n";
             $r .= '.woocommerce ul.products li a.button, .woocommerce ul.products li a.button:hover, .woocommerce #content input.button:hover, .woocommerce #respond input#submit:hover, .woocommerce a.button, .woocommerce button.button:hover, .woocommerce input.button:hover, .woocommerce-page #content input.button:hover, .woocommerce-page #respond input#submit:hover, .woocommerce-page a.button:hover, .woocommerce-page button.button:hover, .woocommerce-page input.button:hover {' . "\n";
             $r .= 'background-color: ' . $theme_mod_primary_color . ' !important;' . "\n";
             $r .= '}' . "\n\n";
             $r .= '#respond .form-allowed-tags {' . "\n";
             $r .= 'border-color: ' . $theme_mod_primary_color . ';' . "\n";
             $r .= '}' . "\n\n";
         }
         // Close </style>
         $r .= '</style>';
         return $r;
     }
 }