get_setting() public method

Retrieve a customize setting.
Since: 3.4.0
public get_setting ( string $id ) : WP_Customize_Setting | void
$id string Customize Setting ID.
return WP_Customize_Setting | void The setting, if set.
Ejemplo n.º 1
1
/**
 * Implement Theme Customizer additions and adjustments.
 *
 * @since Honos 1.0
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function honos_customize_register($wp_customize)
{
    // Add custom description to Colors and Background sections.
    $wp_customize->get_section('colors')->description = esc_html__('Background may only be visible on wide screens.', 'honos');
    $wp_customize->get_section('background_image')->description = esc_html__('Background may only be visible on wide screens.', 'honos');
    // Add postMessage support for site title and description.
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Rename the label to "Site Title Color" because this only affects the site title in this theme.
    $wp_customize->get_control('header_textcolor')->label = esc_html__('Site Title Color', 'honos');
    // Rename the label to "Display Site Title & Tagline" in order to make this option extra clear.
    $wp_customize->get_control('display_header_text')->label = esc_html__('Display Site Title & Tagline', 'honos');
    $wp_customize->get_section('header_image')->title = esc_html__('Logo', 'honos');
    // Add Theme Options panel and configure settings inside it
    $wp_customize->add_panel('honos_theme_options_panel', array('priority' => 260, 'capability' => 'edit_theme_options', 'title' => esc_html__('Theme Options', 'honos'), 'description' => esc_html__('You can configure your theme settings here', 'honos')));
    $wp_customize->add_section('honos_header_call_us', array('priority' => 90, 'capability' => 'edit_theme_options', 'title' => esc_html__('Header Call us', 'honos'), 'description' => esc_html__('Here you\'re able to configure your header call us link.', 'honos'), 'panel' => 'honos_theme_options_panel'));
    $wp_customize->add_setting('honos_header_call_us_text', array('default' => esc_html__('Call us:', 'honos'), 'sanitize_callback' => 'sanitize_text_field'));
    $wp_customize->add_control('honos_header_call_us_text', array('label' => esc_html__('Call us text', 'honos'), 'section' => 'honos_header_call_us', 'type' => 'text'));
    $wp_customize->add_setting('honos_header_call_us_link', array('sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control('honos_header_call_us_link', array('label' => esc_html__('Call us link', 'honos'), 'section' => 'honos_header_call_us', 'type' => 'text'));
    $wp_customize->add_setting('honos_header_call_us_link_text', array('sanitize_callback' => 'sanitize_text_field'));
    $wp_customize->add_control('honos_header_call_us_link_text', array('label' => esc_html__('Call us link text', 'honos'), 'section' => 'honos_header_call_us', 'type' => 'text'));
    // Consult
    $wp_customize->add_section('honos_header_consult', array('priority' => 90, 'capability' => 'edit_theme_options', 'title' => esc_html__('Header Consult', 'honos'), 'description' => esc_html__('Consult text at the header.', 'honos'), 'panel' => 'honos_theme_options_panel'));
    $wp_customize->add_setting('honos_header_consult_text', array('default' => esc_html__('Request a free consultation', 'honos'), 'sanitize_callback' => 'sanitize_text_field'));
    $wp_customize->add_control('honos_header_consult_text', array('label' => esc_html__('Consult text', 'honos'), 'section' => 'honos_header_consult', 'type' => 'text'));
    $wp_customize->add_setting('honos_header_consult_text_link', array('sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control('honos_header_consult_text_link', array('label' => esc_html__('Consult link', 'honos'), 'section' => 'honos_header_consult', 'type' => 'text'));
    // Footer columns
    $wp_customize->add_section('honos_footer_columns', array('priority' => 90, 'capability' => 'edit_theme_options', 'title' => esc_html__('Footer columns', 'honos'), 'description' => esc_html__('Footer column count.', 'honos'), 'panel' => 'honos_theme_options_panel'));
    $wp_customize->add_setting('honos_footer_column_count', array('default' => '4', 'sanitize_callback' => 'absint'));
    $wp_customize->add_control('honos_footer_column_count', array('label' => esc_html__('Footer columns', 'honos'), 'section' => 'honos_footer_columns', 'type' => 'select', 'choices' => array('1' => esc_html__('1 column', 'honos'), '2' => esc_html__('2 columns', 'honos'), '3' => esc_html__('3 columns', 'honos'), '4' => esc_html__('4 columns', 'honos'))));
}
Ejemplo n.º 2
1
/**
Configure custom theme options.
@param WP_Customize_Manager $wp_customize Theme Customizer object.
*/
function zorkish_customize_register($wp_customize)
{
    // Improve display of title, description, and header text color during preview
    // https://developer.wordpress.org/themes/advanced-topics/customizer-api/#using-postmessage-for-improved-setting-previewing
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Add a custom Customizer section
    $wp_customize->add_section('custom_favicon', array('title' => __('Favicon'), 'description' => __('Set up your site\'s favicon.'), 'panel' => '', 'priority' => 160, 'capability' => 'edit_theme_options', 'theme_supports' => ''));
    // Create a setting + control for the site favicons setup
    $wp_customize->add_setting('favicon_links', array('default' => ''));
    $wp_customize->add_control('favicon_links', array('type' => 'textarea', 'priority' => 10, 'section' => 'custom_favicon', 'label' => __('Favicon Links'), 'description' => __('Add your favicon links here.'), 'input_attrs' => array('class' => 'my-custom-class-for-js', 'style' => 'border: 1px solid #900', 'placeholder' => __('Add your favicon links here.'))));
    create_color_setting($wp_customize, 'header_color', 'Header Color', '#232323');
    create_color_setting($wp_customize, 'footer_color', 'Footer Color', '#232323');
    create_color_setting($wp_customize, 'header_byline_color', 'Byline Color', '#DDAE4F');
    // Remember whether Jetpack Site Logo is present
    $site_logo_active = function_exists('jetpack_the_site_logo');
    // Add a section for site logo customization. This is in additions
    // to whatever Jetpack might add (if installed).
    $wp_customize->add_section('zorkish_logo_section', array('title' => __($site_logo_active ? 'Inner Logo' : 'Site Logo', 'zorkish'), 'priority' => 30, 'description' => $site_logo_active ? 'Specify a logo to use on inner pages' : 'Upload a logo to replace the default site name and description in the header'));
    // If Jetpack isn't installed, display the custom logo uploader.
    // ALSO display it if we have a 'zorkish-logo' theme mod, to handle
    // the user adding a custom logo and later installing Jetpack.
    if (!$site_logo_active || get_theme_mod('zorkish-logo')) {
        $wp_customize->add_setting('zorkish_logo');
        $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'zorkish_logo', array('label' => __('Logo', 'zorkish'), 'section' => 'zorkish_logo_section', 'settings' => 'zorkish_logo')));
    }
    // Add a setting for the site's inner logo
    $wp_customize->add_setting('zorkish_inner_logo');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'zorkish_inner_logo', array('label' => __('Inner Logo', 'zorkish'), 'section' => 'zorkish_logo_section', 'settings' => 'zorkish_inner_logo')));
}
Ejemplo n.º 3
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function xsbf_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    //$wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'refresh';
}
Ejemplo n.º 4
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function simplicize_customize_register($wp_customize)
{
    // Set site name and description text to be previewed in real-time
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // Set site title color to be previewed in real-time
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Site Title Section
    $wp_customize->add_section('title_tagline', array('title' => __('Site Title, Tagline & Logo', 'simplicize'), 'priority' => 1));
    //Logo Uploader
    $wp_customize->add_setting('simplicize_logo');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'simplicize_logo', array('label' => __('Logo', 'simplicize'), 'section' => 'title_tagline', 'settings' => 'simplicize_logo', 'priority' => 1)));
    // Site Title Align
    $wp_customize->add_setting('title_align', array('default' => 'center', 'sanitize_callback' => 'simplicize_sanitize_logo_align'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'title_align', array('type' => 'radio', 'label' => __('Title & Logo Alignment', 'simplicize'), 'section' => 'title_tagline', 'choices' => array('left' => __('Left Align', 'simplicize'), 'center' => __('Center Align', 'simplicize'), 'right' => __('Right Align', 'simplicize')), 'priority' => 60)));
    //Layout
    $wp_customize->add_section('simplicize_layout_section', array('title' => __('Layout', 'simplicize'), 'priority' => 104));
    // Display Blog Author
    $wp_customize->add_setting('display_author_blog', array('default' => true, 'sanitize_callback' => 'simplicize_sanitize_checkbox'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'display_author_blog', array('label' => __('Show Blog Author Link?', 'simplicize'), 'section' => 'simplicize_layout_section', 'settings' => 'display_author_blog', 'type' => 'checkbox', 'priority' => 60)));
    // Display Blog Date
    $wp_customize->add_setting('display_date_blog', array('default' => true, 'sanitize_callback' => 'simplicize_sanitize_checkbox'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'display_date_blog', array('label' => __('Show Blog Date?', 'simplicize'), 'section' => 'simplicize_layout_section', 'settings' => 'display_date_blog', 'type' => 'checkbox', 'priority' => 60)));
    // Display Post Featured Image or Video
    $wp_customize->add_setting('display_feature_post', array('default' => true, 'sanitize_callback' => 'simplicize_sanitize_checkbox'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'display_feature_post', array('label' => __('Show Post Featured Images?', 'simplicize'), 'section' => 'simplicize_layout_section', 'settings' => 'display_feature_post', 'type' => 'checkbox', 'priority' => 80)));
}
Ejemplo n.º 5
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function adustus_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->add_section('adustus_primary', array('title' => __('Adustus Basic Settings'), 'description' => __('Here is where you will be able to make simple changes to your site.'), 'priority' => 160));
    $wp_customize->add_setting('adustus_excerpt', array('type' => 'theme_mod', 'default' => '55'));
    $wp_customize->add_control('adustus_excerpt', array('label' => __('Excerpt Length'), 'section' => 'adustus_primary', 'settings' => 'adustus_excerpt', 'type' => 'text'));
    $wp_customize->add_setting('adustus_bg_color', array('type' => 'theme_mod', 'default' => '#eeeeee'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'adustus_bg_color', array('label' => __('Background Color'), 'section' => 'adustus_primary', 'settings' => 'adustus_bg_color')));
    $wp_customize->add_section('adustus_content', array('title' => __('Adustus Content Settings'), 'description' => __('Here is where you will be able to change the categories of specific homepage sections'), 'priority' => 170));
    $categories = get_categories();
    $cats = array();
    $i = 0;
    foreach ($categories as $category) {
        if ($i == 0) {
            $default = $category->slug;
            $i++;
        }
        $cats[$category->slug] = $category->name;
    }
    $wp_customize->add_setting('adustus_featured_category1', array('type' => 'theme_mod', 'default' => $default));
    $wp_customize->add_control('adustus_featured_category1', array('label' => __('Select Category'), 'type' => 'select', 'choices' => $cats, 'section' => 'adustus_content', 'settings' => 'adustus_featured_category1'));
    $wp_customize->add_setting('adustus_featured_category2', array('type' => 'theme_mod', 'default' => $default));
    $wp_customize->add_control('adustus_featured_category2', array('label' => __('Select Category'), 'type' => 'select', 'choices' => $cats, 'section' => 'adustus_content', 'settings' => 'adustus_featured_category2'));
}
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyseventeen_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->selective_refresh->add_partial('blogname', array('selector' => '.site-title a', 'render_callback' => 'twentyseventeen_customize_partial_blogname'));
    $wp_customize->selective_refresh->add_partial('blogdescription', array('selector' => '.site-description', 'render_callback' => 'twentyseventeen_customize_partial_blogdescription'));
    /**
     * Custom colors.
     */
    $wp_customize->add_setting('colorscheme', array('default' => 'light', 'transport' => 'postMessage', 'sanitize_callback' => 'twentyseventeen_sanitize_colorscheme'));
    $wp_customize->add_setting('colorscheme_hue', array('default' => 250, 'transport' => 'postMessage', 'sanitize_callback' => 'absint'));
    $wp_customize->add_control('colorscheme', array('type' => 'radio', 'label' => __('Color Scheme', 'twentyseventeen'), 'choices' => array('light' => __('Light', 'twentyseventeen'), 'dark' => __('Dark', 'twentyseventeen'), 'custom' => __('Custom', 'twentyseventeen')), 'section' => 'colors', 'priority' => 5));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'colorscheme_hue', array('mode' => 'hue', 'section' => 'colors', 'priority' => 6)));
    /**
     * Theme options.
     */
    $wp_customize->add_section('theme_options', array('title' => __('Theme Options', 'twentyseventeen'), 'priority' => 130));
    $wp_customize->add_setting('page_layout', array('default' => 'two-column', 'sanitize_callback' => 'twentyseventeen_sanitize_page_layout', 'transport' => 'postMessage'));
    $wp_customize->add_control('page_layout', array('label' => __('Page Layout', 'twentyseventeen'), 'section' => 'theme_options', 'type' => 'radio', 'description' => __('When the two column layout is assigned, the page title is in one column and content is in the other.', 'twentyseventeen'), 'choices' => array('one-column' => __('One Column', 'twentyseventeen'), 'two-column' => __('Two Column', 'twentyseventeen')), 'active_callback' => 'twentyseventeen_is_view_with_layout_option'));
    /**
     * Filter number of front page sections in Twenty Seventeen.
     *
     * @since Twenty Seventeen 1.0
     *
     * @param $num_sections integer
     */
    $num_sections = apply_filters('twentyseventeen_front_page_sections', 4);
    // Create a setting and control for each of the sections available in the theme.
    for ($i = 1; $i < 1 + $num_sections; $i++) {
        $wp_customize->add_setting('panel_' . $i, array('default' => false, 'sanitize_callback' => 'absint', 'transport' => 'postMessage'));
        $wp_customize->add_control('panel_' . $i, array('label' => sprintf(__('Front Page Section %d Content', 'twentyseventeen'), $i), 'description' => 1 !== $i ? '' : __('Select pages to feature in each area from the dropdowns. Add an image to a section by setting a featured image in the page editor. Empty sections will not be displayed.', 'twentyseventeen'), 'section' => 'theme_options', 'type' => 'dropdown-pages', 'allow_addition' => true, 'active_callback' => 'twentyseventeen_is_static_front_page'));
        $wp_customize->selective_refresh->add_partial('panel_' . $i, array('selector' => '#panel' . $i, 'render_callback' => 'twentyseventeen_front_page_section', 'container_inclusive' => true));
    }
}
 /**
  * This hooks into 'customize_register' (available as of WP 3.4) and allows
  * you to add new sections and controls to the Theme Customize screen.
  *
  * Note: To enable instant preview, we have to actually write a bit of custom
  * javascript. See live_preview() for more.
  *
  * @see add_action('customize_register',$func)
  * @param \WP_Customize_Manager $wp_customize
  * @link http://ottopress.com/2012/how-to-leverage-the-theme-customizer-in-your-own-themes
  */
 public static function register($wp_customize)
 {
     //2. Register new settings to the WP database...
     $wp_customize->add_setting('highlight_color', array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage'));
     //3. Finally, we define the control itself (which links a setting to a section and renders the HTML controls)...
     $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'mytheme_highlight_color', array('label' => __('Highlight Color', 'historias'), 'section' => 'colors', 'settings' => 'highlight_color', 'priority' => 10)));
     $wp_customize->add_setting('site_logo', array('type' => 'theme_mod', 'default' => get_template_directory_uri() . '/images/setoriais_logo.png'));
     $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'upload_site_logo', array('label' => __('Site Logo', 'historias'), 'section' => 'title_tagline', 'settings' => 'site_logo', 'priority' => 10)));
     $wp_customize->add_setting('site_tagline', array('default' => 'Eleição 2015', 'type' => 'option'));
     $wp_customize->add_control('site_tagline', array('type' => 'textarea', 'section' => 'title_tagline', 'label' => __('Tagline', 'historias')));
     //4. We can also change built-in settings by modifying properties. For instance, let's make some stuff use live preview JS...
     $wp_customize->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';
     // $wp_customize->add_section('setorial_cnpc_logo_section', array(
     //     'title'    => __('Logo', 'setorial_cnpc'),
     //     'description' => '',
     //     'priority' => 40,
     // ));
     // $wp_customize->add_setting('setorial_cnpc_logo]', array(
     //     'capability'        => 'edit_theme_options',
     //     'type'           => 'theme_mod',
     //     'default'  =>  get_template_directory_uri() . '/images/setoriais_logo.png',
     // ));
     // $wp_customize->add_control( new WP_Customize_Image_Control($wp_customize, 'setorial_cnpc_logo', array(
     //     'label'    => __('Imagem da logo', 'setorial_cnpc'),
     //     'section'  => 'setorial_cnpc_logo_section',
     //     'settings' => 'setorial_cnpc_logo',
     // )));
 }
Ejemplo n.º 8
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function twentyfourteen_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->add_setting('accent_color', array('default' => '#24890d', 'sanitize_callback' => 'twentyfourteen_generate_accent_colors'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'accent_color', array('label' => __('Accent Color', 'twentyfourteen'), 'section' => 'colors', 'settings' => 'accent_color')));
}
/**
 * Implement Customizer additions and adjustments.
 *
 * @since Twenty Fourteen 1.0
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */
function twentyfourteen_customize_register($wp_customize)
{
    // Add postMessage support for site title and description.
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    if (isset($wp_customize->selective_refresh)) {
        $wp_customize->selective_refresh->add_partial('blogname', array('selector' => '.site-title a', 'container_inclusive' => false, 'render_callback' => 'twentyfourteen_customize_partial_blogname'));
        $wp_customize->selective_refresh->add_partial('blogdescription', array('selector' => '.site-description', 'container_inclusive' => false, 'render_callback' => 'twentyfourteen_customize_partial_blogdescription'));
    }
    // Rename the label to "Site Title Color" because this only affects the site title in this theme.
    $wp_customize->get_control('header_textcolor')->label = __('Site Title Color', 'twentyfourteen');
    // Rename the label to "Display Site Title & Tagline" in order to make this option extra clear.
    $wp_customize->get_control('display_header_text')->label = __('Display Site Title &amp; Tagline', 'twentyfourteen');
    // Add custom description to Colors and Background controls or sections.
    if (property_exists($wp_customize->get_control('background_color'), 'description')) {
        $wp_customize->get_control('background_color')->description = __('May only be visible on wide screens.', 'twentyfourteen');
        $wp_customize->get_control('background_image')->description = __('May only be visible on wide screens.', 'twentyfourteen');
    } else {
        $wp_customize->get_section('colors')->description = __('Background may only be visible on wide screens.', 'twentyfourteen');
        $wp_customize->get_section('background_image')->description = __('Background may only be visible on wide screens.', 'twentyfourteen');
    }
    // Add the featured content section in case it's not already there.
    $wp_customize->add_section('featured_content', array('title' => __('Featured Content', 'twentyfourteen'), 'description' => sprintf(__('Use a <a href="%1$s">tag</a> to feature your posts. If no posts match the tag, <a href="%2$s">sticky posts</a> will be displayed instead.', 'twentyfourteen'), esc_url(add_query_arg('tag', _x('featured', 'featured content default tag slug', 'twentyfourteen'), admin_url('edit.php'))), admin_url('edit.php?show_sticky=1')), 'priority' => 130, 'active_callback' => 'is_front_page'));
    // Add the featured content layout setting and control.
    $wp_customize->add_setting('featured_content_layout', array('default' => 'grid', 'sanitize_callback' => 'twentyfourteen_sanitize_layout'));
    $wp_customize->add_control('featured_content_layout', array('label' => __('Layout', 'twentyfourteen'), 'section' => 'featured_content', 'type' => 'select', 'choices' => array('grid' => __('Grid', 'twentyfourteen'), 'slider' => __('Slider', 'twentyfourteen'))));
}
Ejemplo n.º 10
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function dbx_paper_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('sitelogo')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
}
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function hamburgercat_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    //All our sections, settings, and controls will be added here
    $wp_customize->add_setting('austeve_background_image');
    $wp_customize->add_setting('austeve_background_opacity');
    $wp_customize->add_setting('austeve_logo_image');
    $wp_customize->add_setting('austeve_num_sidebars');
    $wp_customize->add_setting('austeve_display_tagline');
    $wp_customize->add_section('hamburgercat_bg_section', array('title' => __('Background', 'hamburgercat'), 'priority' => 30, 'description' => 'Upload a background image'));
    $wp_customize->add_section('hamburgercat_images_section', array('title' => __('Images', 'hamburgercat'), 'priority' => 30, 'description' => 'Upload Images used in the theme here'));
    //Number of sidebars
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'austeve_num_sidebars', array('label' => __('Rows of content:', 'hamburger_cat'), 'section' => 'static_front_page', 'settings' => 'austeve_num_sidebars', 'type' => 'select', 'choices' => array('0' => __('None'), '1' => __('1'), '2' => __('2'), '3' => __('3'), '4' => __('4'), '5' => __('5'), '6' => __('6'), '7' => __('7'), '8' => __('8'), '9' => __('9')))));
    //Sidebar layouts
    for ($l = 1; $l <= get_theme_mod('austeve_num_sidebars', 0); $l++) {
        $wp_customize->add_setting('austeve_content_layout_' . $l, array('default' => '12', 'transport' => 'refresh'));
        $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'austeve_content_layout_' . $l, array('label' => __('Row ' . $l . ' layout', 'hamburger_cat'), 'section' => 'static_front_page', 'settings' => 'austeve_content_layout_' . $l, 'type' => 'text')));
    }
    //Background Image
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'austeve_background_image', array('label' => __('Image:', 'hamburgercat'), 'section' => 'hamburgercat_bg_section', 'settings' => 'austeve_background_image')));
    //Background opacity
    $wp_customize->add_control('austeve_background_opacity', array('label' => __('Opacity', 'hamburgercat'), 'section' => 'hamburgercat_bg_section', 'settings' => 'austeve_background_opacity', 'type' => 'text'));
    //Display tagline
    $wp_customize->add_control('austeve_display_tagline', array('label' => __('Display tagline', 'hamburgercat'), 'section' => 'title_tagline', 'settings' => 'austeve_display_tagline', 'type' => 'checkbox'));
    //Logo
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'austeve_logo_image', array('label' => __('Logo:', 'hamburgercat'), 'section' => 'title_tagline', 'settings' => 'austeve_logo_image')));
}
Ejemplo n.º 12
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function aggression_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    /**
     * Add Section Layout to the Customizer.
     */
    $wp_customize->add_section('aggression-theme-options', array('title' => __('Theme Options', 'aggression'), 'capability' => 'edit_theme_options', 'description' => 'Edit Theme Options'));
    /**
     * Create Layout Setting.
     */
    $wp_customize->add_setting('aggression_layout_settings', array('default' => 'full-width', 'type' => 'theme_mod', 'sanitize_callback' => 'aggression_layout_setting_sanitize', 'transport' => 'postMessage'));
    /**
     * Add Layout Controls.
     */
    $wp_customize->add_control('aggression_layout_control', array('settings' => 'aggression_layout_settings', 'type' => 'radio', 'label' => __('Layout Options', 'aggression'), 'choices' => array('full-width' => __('Full Width (default)', 'aggression'), 'content-sidebar' => __('Content-Sidebar', 'aggression'), 'sidebar-content' => __('Sidebar-Content', 'aggression'), 'sidebar-content-sidebar' => __('Sidebar-Content-Sidebar', 'aggression'), 'content-sidebar-sidebar' => __('Content-Sidebar-Sidebar', 'aggression'), 'sidebar-sidebar-content' => __('Sidebar-Sidebar-Content', 'aggression')), 'section' => 'aggression-theme-options'));
    /**
     * Page Titles.
     */
    $wp_customize->add_setting('aggression_page_titles_settings', array('default' => 'on', 'type' => 'theme_mod', 'sanitize_callback' => 'aggression_page_title_sanitize', 'transport' => 'postMessage'));
    /**
     * Page Titles Controls.
     */
    $wp_customize->add_control('aggression_page_titles_control', array('settings' => 'aggression_page_titles_settings', 'type' => 'radio', 'label' => __('Page Titles', 'aggression'), 'choices' => array('on' => __('On (default)', 'aggression'), 'off' => __('Off', 'aggression')), 'section' => 'aggression-theme-options'));
}
Ejemplo n.º 13
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function undiscovered_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // Logo upload
    $wp_customize->add_section('undiscovered_logotype', array('title' => __('Logotype', 'undiscovered'), 'priority' => 30, 'description' => 'Upload a logo to replace the default site name in the header'));
    $wp_customize->add_setting('undiscovered_options[logotype]', array('capability' => 'edit_theme_options', 'type' => 'option'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'logotype', array('label' => __('Logo', 'undiscovered'), 'section' => 'undiscovered_logotype', 'settings' => 'undiscovered_options[logotype]')));
    // Fonts
    $wp_customize->add_section('undiscovered_fonts', array('title' => __('Fonts', 'undiscovered'), 'priority' => 30, 'description' => 'Set main website font'));
    $wp_customize->add_setting('undiscovered_options[font]', array('capability' => 'edit_theme_options', 'default' => 'Rokkit', 'type' => 'option'));
    $wp_customize->add_control('font', array('settings' => 'undiscovered_options[font]', 'label' => __('Fonts', 'undiscovered'), 'section' => 'undiscovered_fonts', 'type' => 'select', 'choices' => array('Rokkitt' => 'Rokkitt', 'Kameron' => 'Kameron', 'Abel' => 'Abel', 'Alice' => 'Alice', 'Andada' => 'Andada', 'Arbutus+Slab' => 'Arbutus Slab', 'Arvo' => 'Arvo', 'Brawler' => 'Brawler', 'Cambo' => 'Cambo', 'Cookie' => 'Cookie', 'Droid+Serif' => 'Droid Serif', 'Fenix' => 'Fenix', 'Judson' => 'Judson', 'Ledger' => 'Ledger', 'Libre+Baskerville' => 'Libre Baskerville', 'Lora' => 'Lora', 'Mako' => 'Mako', 'Marck+Script' => 'Marck Script', 'Maven+Pro' => 'Maven Pro', 'Neuton' => 'Neuton', 'Ovo' => 'Ovo', 'PT+Serif+Caption' => 'PT Serif Caption')));
    // Colors
    $wp_customize->add_section('undiscovered_colors', array('title' => __('Colors', 'undiscovered'), 'priority' => 40));
    // Primary
    $wp_customize->add_setting('undiscovered_options[primary_color]', array('default' => 'e83d52', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'primary_color', array('label' => __('Primary color', 'undiscovered'), 'section' => 'undiscovered_colors', 'settings' => 'undiscovered_options[primary_color]')));
    // Secondary
    $wp_customize->add_setting('undiscovered_options[secondary_color]', array('default' => 'be3243', 'sanitize_callback' => 'sanitize_hex_color', 'capability' => 'edit_theme_options', 'type' => 'option'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'secondary_color', array('label' => __('Secondary color', 'undiscovered'), 'section' => 'undiscovered_colors', 'settings' => 'undiscovered_options[secondary_color]')));
    // Social icons
    $wp_customize->add_section('undiscovered_social', array('title' => __('Social icons', 'undiscovered'), 'priority' => 30, 'description' => 'Leave blank if don\'t needed'));
    $networks = get_social_networks();
    foreach ($networks as $network) {
        $wp_customize->add_setting('undiscovered_options[social_' . strtolower($network) . ']', array('capability' => 'edit_theme_options', 'type' => 'option'));
        $wp_customize->add_control('undiscovered_options[social_' . strtolower($network) . ']', array('label' => $network, 'section' => 'undiscovered_social', 'type' => 'text'));
    }
}
Ejemplo n.º 14
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function everbox_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->add_section('everbox_general_section', array('title' => __('General', 'everbox')));
    // Primary Color
    $wp_customize->add_setting('everbox_primary_color', array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'everbox_sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'everbox_primary_color', array('label' => __('Primary Color', 'everbox'), 'section' => 'everbox_general_section', 'settings' => 'everbox_primary_color')));
    // Post excerpt length
    $wp_customize->add_setting('everbox_excerpt_length', array('default' => 60, 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'everbox_sanitize_integer'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'everbox_excerpt_length', array('label' => __('Post excerpt length', 'everbox'), 'section' => 'everbox_general_section', 'settings' => 'everbox_excerpt_length', 'type' => 'number')));
    // Cagetory link
    $wp_customize->add_setting('everbox_category_link', array('default' => 1, 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'everbox_sanitize_bool'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'everbox_category_link', array('label' => __('Show cagetory link', 'everbox'), 'section' => 'everbox_general_section', 'settings' => 'everbox_category_link', 'type' => 'checkbox')));
    // Infinite loading
    $wp_customize->add_setting('everbox_infinite', array('default' => 0, 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'everbox_sanitize_bool'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'everbox_infinite', array('label' => __('Infinite Pagination with jetpack', 'everbox'), 'section' => 'everbox_general_section', 'settings' => 'everbox_infinite', 'type' => 'checkbox')));
    // Credit
    $wp_customize->add_setting('everbox_credit', array('default' => 1, 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'everbox_sanitize_bool'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'everbox_credit', array('label' => __('Footer Credit', 'everbox'), 'section' => 'everbox_general_section', 'settings' => 'everbox_credit', 'type' => 'checkbox')));
    $wp_customize->add_section('everbox_icons_section', array('title' => __('ICONS', 'everbox')));
    // LOGO
    $wp_customize->add_setting('everbox_logo', array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'everbox_logo', array('label' => __('LOGO', 'everbox'), 'section' => 'everbox_icons_section', 'settings' => 'everbox_logo')));
    // favicon
    $wp_customize->add_setting('everbox_favicon', array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'everbox_favicon', array('label' => __('Favicon', 'everbox'), 'section' => 'everbox_icons_section', 'settings' => 'everbox_favicon')));
    // iPhone App icon
    $wp_customize->add_setting('everbox_app', array('default' => '', 'type' => 'theme_mod', 'capability' => 'edit_theme_options', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'everbox_app', array('label' => __('iPhone Retina icon (sizes:120x120)', 'everbox'), 'section' => 'everbox_icons_section', 'settings' => 'everbox_app')));
}
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function edin_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->add_section('edin_theme_options', array('title' => __('Theme Options', 'edin'), 'priority' => 130));
    /* Menu Style */
    $wp_customize->add_setting('edin_menu_style', array('default' => 'default', 'sanitize_callback' => 'edin_sanitize_menu_style'));
    $wp_customize->add_control('edin_menu_style', array('label' => __('Menu Style', 'edin'), 'section' => 'edin_theme_options', 'priority' => 1, 'type' => 'radio', 'choices' => array('default' => __('Default', 'edin'), 'classic' => __('Classic', 'edin'))));
    /* Sidebar Position */
    $wp_customize->add_setting('edin_sidebar_position', array('default' => 'right', 'sanitize_callback' => 'edin_sanitize_sidebar_position', 'transport' => 'postMessage'));
    $wp_customize->add_control('edin_sidebar_position', array('label' => __('Sidebar Position', 'edin'), 'section' => 'edin_theme_options', 'priority' => 2, 'type' => 'radio', 'choices' => array('left' => __('Left', 'edin'), 'right' => __('Right', 'edin'))));
    /* Thumbnail Aspect Ratio */
    $wp_customize->add_setting('edin_thumbnail_style', array('default' => 'landscape', 'sanitize_callback' => 'edin_sanitize_thumbnail_style'));
    $wp_customize->add_control('edin_thumbnail_style', array('label' => __('Thumbnail Aspect Ratio', 'edin'), 'section' => 'edin_theme_options', 'priority' => 3, 'type' => 'radio', 'choices' => array('landscape' => __('Landscape (4:3)', 'edin'), 'square' => __('Square (1:1)', 'edin'))));
    /* Header: show breadcrumb navigation */
    if (function_exists('jetpack_breadcrumbs')) {
        $wp_customize->add_setting('edin_breadcrumbs', array('default' => '', 'sanitize_callback' => 'edin_sanitize_checkbox'));
        $wp_customize->add_control('edin_breadcrumbs', array('label' => __('Pages: show breadcrumb navigation', 'edin'), 'section' => 'edin_theme_options', 'priority' => 4, 'type' => 'checkbox'));
    }
    /* Featured Image: Remove filter */
    $wp_customize->add_setting('edin_featured_image_remove_filter', array('default' => '', 'sanitize_callback' => 'edin_sanitize_checkbox', 'transport' => 'postMessage'));
    $wp_customize->add_control('edin_featured_image_remove_filter', array('label' => __('Featured Image: remove filter', 'edin'), 'section' => 'edin_theme_options', 'priority' => 5, 'type' => 'checkbox'));
    /* Header: show search form */
    $wp_customize->add_setting('edin_search_header', array('default' => '', 'sanitize_callback' => 'edin_sanitize_checkbox'));
    $wp_customize->add_control('edin_search_header', array('label' => __('Header: show search form', 'edin'), 'section' => 'edin_theme_options', 'priority' => 6, 'type' => 'checkbox'));
    /* Front Page: show title */
    $wp_customize->add_setting('edin_title_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_checkbox'));
    $wp_customize->add_control('edin_title_front_page', array('label' => __('Front Page: show title', 'edin'), 'section' => 'edin_theme_options', 'priority' => 7, 'type' => 'checkbox'));
    /* Front Page: Featured Page One */
    $wp_customize->add_setting('edin_featured_page_one_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_one_front_page', array('label' => __('Front Page: Featured Page One', 'edin'), 'section' => 'edin_theme_options', 'priority' => 8, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Two */
    $wp_customize->add_setting('edin_featured_page_two_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_two_front_page', array('label' => __('Front Page: Featured Page Two', 'edin'), 'section' => 'edin_theme_options', 'priority' => 9, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Three */
    $wp_customize->add_setting('edin_featured_page_three_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_three_front_page', array('label' => __('Front Page: Featured Page Three', 'edin'), 'section' => 'edin_theme_options', 'priority' => 10, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Four */
    $wp_customize->add_setting('edin_featured_page_four_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_four_front_page', array('label' => __('Front Page: Featured Page Four', 'edin'), 'section' => 'edin_theme_options', 'priority' => 11, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Five */
    $wp_customize->add_setting('edin_featured_page_five_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_five_front_page', array('label' => __('Front Page: Featured Page Five', 'edin'), 'section' => 'edin_theme_options', 'priority' => 12, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Six */
    $wp_customize->add_setting('edin_featured_page_six_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_six_front_page', array('label' => __('Front Page: Featured Page Six', 'edin'), 'section' => 'edin_theme_options', 'priority' => 13, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Seven */
    $wp_customize->add_setting('edin_featured_page_seven_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_seven_front_page', array('label' => __('Front Page: Featured Page Seven', 'edin'), 'section' => 'edin_theme_options', 'priority' => 14, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Eight */
    $wp_customize->add_setting('edin_featured_page_eight_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_eight_front_page', array('label' => __('Front Page: Featured Page Eight', 'edin'), 'section' => 'edin_theme_options', 'priority' => 15, 'type' => 'dropdown-pages'));
    /* Front Page: Featured Page Nine */
    $wp_customize->add_setting('edin_featured_page_nine_front_page', array('default' => '', 'sanitize_callback' => 'edin_sanitize_dropdown_pages'));
    $wp_customize->add_control('edin_featured_page_nine_front_page', array('label' => __('Front Page: Featured Page Nine', 'edin'), 'section' => 'edin_theme_options', 'priority' => 16, 'type' => 'dropdown-pages'));
    /* Jetpack Testimonial */
    $wp_customize->add_setting('edin_testimonials', array('default' => '', 'sanitize_callback' => 'edin_sanitize_checkbox'));
    $wp_customize->add_control('edin_testimonials', array('label' => __('Show 2 random testimonials on the Front Page Template ', 'edin'), 'section' => 'jetpack_testimonials', 'priority' => 90, 'type' => 'checkbox'));
}
Ejemplo n.º 16
0
 /**
  * @param WP_Customize_Manager $wp_customize
  * @internal
  */
 function _action_customizer_live_fw_options($wp_customize)
 {
     if ($wp_customize->get_setting('fw_options[OPTION_ID]')) {
         $wp_customize->get_setting('fw_options[OPTION_ID]')->transport = 'postMessage';
         add_action('customize_preview_init', '_action_customizer_live_fw_options_preview');
     }
 }
Ejemplo n.º 17
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 *
 * @since NARGA v1.6
 */
function narga_customize_register($wp_customize)
{
    $readmore = narga_options('post_readmore');
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
}
Ejemplo n.º 18
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function agency_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->add_setting('header_bg_color', array('default' => '#000000', 'transport' => 'postMessage'));
    /*
     * Logo Uploader
     */
    $wp_customize->add_section('agency_logo_section', array('title' => __('Logo', 'agency'), 'priority' => 5, 'description' => 'Upload a logo to replace the default site name and description in the header'));
    $wp_customize->add_setting('agency_logo');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'agency_logo', array('label' => __('Logo (70px by 70px)', 'agency'), 'section' => 'agency_logo_section', 'settings' => 'agency_logo')));
    /*
     * Accent Color Picker
     */
    $wp_customize->add_setting('accent_color', array('default' => '#ffc600'));
    // add color picker control
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'accent_color', array('label' => 'Accent Color', 'section' => 'colors', 'settings' => 'accent_color')));
    /*
     * Default Header Background
     */
    $wp_customize->add_section('agency_header_bg', array('title' => __('Default Header BG', 'agency'), 'priority' => 10, 'description' => 'Upload a background image to default to when no Featured Image is present.'));
    $wp_customize->add_setting('agency_bg');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'agency_bg', array('label' => __('Header Background Image', 'agency'), 'section' => 'agency_header_bg', 'settings' => 'agency_bg')));
}
Ejemplo n.º 19
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function create_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    class CreateImportantLinks extends WP_Customize_Control
    {
        public $type = 'important-links';
        public function render_content()
        {
            //Add Theme instruction, Support Forum, Changelog, Donate link, Review, Facebook, Twitter, Google+, Pinterest links
            $important_links = array('theme_instructions' => array('link' => esc_url('http://catchthemes.com/theme-instructions/create/'), 'text' => __('Theme Instructions', 'create')), 'support' => array('link' => esc_url('http://catchthemes.com/support/'), 'text' => __('Support', 'create')), 'changelog' => array('link' => esc_url('http://catchthemes.com/changelogs/create-theme/'), 'text' => __('Changelog', 'create')), 'donate' => array('link' => esc_url('http://catchthemes.com/donate/'), 'text' => __('Donate Now', 'create')), 'review' => array('link' => esc_url('https://wordpress.org/support/view/theme-reviews/create'), 'text' => __('Review', 'create')), 'facebook' => array('link' => esc_url('https://www.facebook.com/catchthemes/'), 'text' => __('Facebook', 'create')), 'twitter' => array('link' => esc_url('https://twitter.com/catchthemes/'), 'text' => __('Twitter', 'create')), 'gplus' => array('link' => esc_url('https://plus.google.com/+Catchthemes/'), 'text' => __('Google+', 'create')), 'pinterest' => array('link' => esc_url('http://www.pinterest.com/catchthemes/'), 'text' => __('Pinterest', 'create')));
            foreach ($important_links as $important_link) {
                echo '<p><a target="_blank" href="' . $important_link['link'] . '" >' . $important_link['text'] . ' </a></p>';
            }
        }
    }
    //Important Links
    $wp_customize->add_section('important_links', array('priority' => 999, 'title' => __('Important Links', 'create')));
    /**
     * Has dummy Sanitizaition function as it contains no value to be sanitized
     */
    $wp_customize->add_setting('important_links', array('sanitize_callback' => 'create_sanitize_important_link'));
    $wp_customize->add_control(new CreateImportantLinks($wp_customize, 'important_links', array('label' => __('Important Links', 'create'), 'section' => 'important_links', 'settings' => 'important_links', 'type' => 'important_links')));
    //Important Links End
}
 /**
  * Add multilingual controls.
  * The original controls will be hidden.
  * @param WP_Customize_Manager $wp_customize
  */
 public static function action__customize_register(WP_Customize_Manager $wp_customize)
 {
     /**
      * Blog Name
      */
     $wp_customize->add_setting('wpglobus_blogname', array('default' => WPGlobus_Core::text_filter(get_bloginfo('name'), WPGlobus::Config()->language)));
     $wp_customize->get_setting('wpglobus_blogname')->transport = 'postMessage';
     $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'wpglobus_blogname', array('label' => __('Site Title'), 'type' => 'text', 'section' => 'title_tagline', 'settings' => 'wpglobus_blogname', 'values' => WPGlobus_Core::text_filter(get_bloginfo('name'), WPGlobus::Config()->language), 'input_attrs' => array('class' => 'wpglobus-customize-control wpglobus-not-trigger-change'))));
     /**
      * Blog Description
      */
     $wp_customize->add_setting('wpglobus_blogdescription', array('default' => WPGlobus_Core::text_filter(get_bloginfo('description'), WPGlobus::Config()->language)));
     $wp_customize->get_setting('wpglobus_blogdescription')->transport = 'postMessage';
     $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'wpglobus_blogdescription', array('label' => __('Tagline'), 'type' => 'text', 'section' => 'title_tagline', 'settings' => 'wpglobus_blogdescription', 'input_attrs' => array('class' => 'wpglobus-customize-control wpglobus-not-trigger-change'))));
     /**
      * Add elements from wpglobus-config.json
      */
     if (empty(WPGlobus::Config()->WPGlobus_WP_Theme)) {
         return;
     }
     foreach (WPGlobus::Config()->WPGlobus_WP_Theme->elements as $key => $value) {
         /**
          * $value['type']
          * @see https://codex.wordpress.org/Class_Reference/WP_Customize_Control  for Input Types 
          */
         $wp_customize->add_setting($key, array('default' => ''));
         $wp_customize->get_setting($key)->transport = 'postMessage';
         $wp_customize->add_control(new WP_Customize_Control($wp_customize, $key, array('label' => '{{title}}', 'description' => '{{description}}', 'type' => $value['type'], 'section' => $value['section'], 'settings' => $key, 'input_attrs' => array('class' => 'wpglobus-customize-control wpglobus-control-' . $value['type'], 'data-type' => $value['type'], 'data-source' => ''))));
     }
 }
Ejemplo n.º 21
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function dazzling_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->default = '#1FA67A';
}
Ejemplo n.º 22
0
/**
 * Implement Theme Customizer additions and adjustments.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function graphy_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->add_setting('graphy_hide_blogdescription', array('default' => '', 'sanitize_callback' => 'graphy_sanitize_checkbox'));
    $wp_customize->add_control('graphy_hide_blogdescription', array('label' => __('Hide Tagline', 'graphy'), 'section' => 'title_tagline', 'settings' => 'graphy_hide_blogdescription', 'type' => 'checkbox'));
    $wp_customize->add_section('graphy_logo', array('title' => __('Logo', 'graphy'), 'priority' => 20));
    $wp_customize->add_setting('graphy_logo', array('default' => '', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'graphy_logo', array('label' => __('Upload Logo', 'graphy'), 'section' => 'graphy_logo', 'settings' => 'graphy_logo')));
    $wp_customize->add_setting('graphy_top_margin', array('default' => '0', 'sanitize_callback' => 'graphy_sanitize_margin'));
    $wp_customize->add_control('graphy_top_margin', array('label' => __('Top Margin (px)', 'graphy'), 'section' => 'graphy_logo', 'settings' => 'graphy_top_margin', 'type' => 'text'));
    $wp_customize->add_setting('graphy_bottom_margin', array('default' => '0', 'sanitize_callback' => 'graphy_sanitize_margin'));
    $wp_customize->add_control('graphy_bottom_margin', array('label' => __('Bottom Margin (px)', 'graphy'), 'section' => 'graphy_logo', 'settings' => 'graphy_bottom_margin', 'type' => 'text'));
    $wp_customize->add_setting('graphy_replace_blogname', array('default' => '', 'sanitize_callback' => 'graphy_sanitize_checkbox'));
    $wp_customize->add_control('graphy_replace_blogname', array('label' => __('Replace Title', 'graphy'), 'section' => 'graphy_logo', 'settings' => 'graphy_replace_blogname', 'type' => 'checkbox'));
    $wp_customize->add_setting('graphy_add_border_radius', array('default' => '', 'sanitize_callback' => 'graphy_sanitize_checkbox'));
    $wp_customize->add_control('graphy_add_border_radius', array('label' => __('Add Border Radius', 'graphy'), 'section' => 'graphy_logo', 'settings' => 'graphy_add_border_radius', 'type' => 'checkbox'));
    $wp_customize->add_setting('graphy_link_color', array('default' => '#a62425', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'graphy_link_color', array('label' => __('Link Color', 'graphy'), 'section' => 'colors', 'settings' => 'graphy_link_color')));
    $wp_customize->add_setting('graphy_link_hover_color', array('default' => '#b85051', 'transport' => 'refresh', 'sanitize_callback' => 'sanitize_hex_color'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'graphy_link_hover_color', array('label' => __('Link Hover Color', 'graphy'), 'section' => 'colors', 'settings' => 'graphy_link_hover_color')));
    $wp_customize->add_setting('graphy_hide_search', array('default' => '', 'sanitize_callback' => 'graphy_sanitize_checkbox'));
    $wp_customize->add_control('graphy_hide_search', array('label' => __('Hide Serach', 'graphy'), 'section' => 'nav', 'settings' => 'graphy_hide_search', 'type' => 'checkbox'));
    $wp_customize->add_section('graphy_article', array('title' => __('Article', 'graphy'), 'priority' => 100));
    $wp_customize->add_setting('graphy_content', array('default' => 'summary', 'sanitize_callback' => 'graphy_sanitize_content'));
    $wp_customize->add_control('graphy_content', array('label' => __('Display', 'graphy'), 'section' => 'graphy_article', 'settings' => 'graphy_content', 'type' => 'select', 'choices' => array('summary' => __('Summary', 'graphy'), 'content' => __('Full text', 'graphy'))));
    $wp_customize->add_setting('graphy_hide_author', array('default' => '', 'sanitize_callback' => 'graphy_sanitize_checkbox'));
    $wp_customize->add_control('graphy_hide_author', array('label' => __('Hide Author', 'graphy'), 'section' => 'graphy_article', 'settings' => 'graphy_hide_author', 'type' => 'checkbox'));
    $wp_customize->add_setting('graphy_hide_category', array('default' => '', 'sanitize_callback' => 'graphy_sanitize_checkbox'));
    $wp_customize->add_control('graphy_hide_category', array('label' => __('Hide Categories', 'graphy'), 'section' => 'graphy_article', 'settings' => 'graphy_hide_category', 'type' => 'checkbox'));
}
Ejemplo n.º 23
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function esell_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('background_color')->transport = 'postMessage';
    $wp_customize->remove_section("background_image");
}
Ejemplo n.º 24
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function adaptable_customize_register($wp_customize)
{
    /*class Color_Scheme_Custom_Control extends WP_Customize_Control {
    		public function render_content() {
    			?>
    			<label>
    	              <span class="customize-color-scheme-control"><?php echo esc_html( $this->label ); ?></span>
    	              <ul>
    	                <li><img src="<?php echo get_template_directory_uri() . '/images/eggplant.png' ?>" alt="Eggplant" /><input type="radio" name="<?php echo $this->id; ?>" id="<?php echo $this->id; ?>[style.css]" value="1" /></li>
    	                <li><img src="<?php echo get_template_directory_uri() . '/images/silverblue.png' ?>" alt="Silver Blue" /><input type="radio" name="<?php echo $this->id; ?>" id="<?php echo $this->id; ?>[bluewhitegray.css]" value="1" /></li>
    	              </ul>
    	        </label>
    			<?php
    		}
    	}*/
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    /* Adding a logo/image at the top of the sidebar */
    $wp_customize->add_section('adaptable_logo_section', array('title' => __('Logo/Sidebar Image', 'adaptable'), 'priority' => 30, 'description' => 'Upload an image to appear at the top of the sidebar. Examples include a logo or blogger photo.'));
    $wp_customize->add_setting('adaptable_logo');
    $wp_customize->add_control(new WP_Customize_Image_Control($wp_customize, 'adaptable_logo', array('label' => __('Logo/Sidebar Image', 'adaptable'), 'section' => 'adaptable_logo_section', 'settings' => 'adaptable_logo')));
    /* Add color scheme options */
    $wp_customize->add_setting('adaptable_color_scheme');
    $wp_customize->add_control('adaptable_color_scheme', array('label' => __('Color Scheme', 'adaptable'), 'section' => 'colors', 'settings' => 'adaptable_color_scheme', 'type' => 'radio', 'choices' => array('style.css' => 'Eggplant (Default)', 'bluewhitegray.css' => "Blue/White/Gray")));
}
Ejemplo n.º 25
0
/**
 * Add postMessage support for site title and description for the Customizer.
 *
 * @since Kute Theme 1.0
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
 */
function kt_customize_register($wp_customize)
{
    $color_scheme = kt_get_color_scheme();
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    // Add color scheme setting and control.
    $wp_customize->add_setting('color_scheme', array('default' => 'default', 'sanitize_callback' => 'kt_sanitize_color_scheme', 'transport' => 'postMessage'));
    $wp_customize->add_control('color_scheme', array('label' => esc_attr__('Base Color Scheme', 'kutetheme'), 'section' => 'colors', 'type' => 'select', 'choices' => kt_get_color_scheme_choices(), 'priority' => 1));
    // Add custom header and sidebar text color setting and control.
    $wp_customize->add_setting('main_color', array('default' => $color_scheme[1], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'main_color', array('label' => esc_attr__('Theme Color', 'kutetheme'), 'description' => esc_attr__('Applied to the theme color.', 'kutetheme'), 'section' => 'colors')));
    // Remove the core header textcolor control, as it shares the sidebar text color.
    $wp_customize->remove_control('header_textcolor');
    // Add custom header and sidebar background color setting and control.
    $wp_customize->add_setting('box_background_color', array('default' => $color_scheme[2], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'box_background_color', array('label' => esc_attr__('Box and Sidebar Background Color', 'kutetheme'), 'description' => esc_attr__('Applied to the box and sidebar color.', 'kutetheme'), 'section' => 'colors')));
    // Add custom header and sidebar background color setting and control.
    $wp_customize->add_setting('textcolor', array('default' => $color_scheme[3], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'textcolor', array('label' => esc_attr__('Text Color', 'kutetheme'), 'description' => esc_attr__('Applied to the text color', 'kutetheme'), 'section' => 'colors')));
    // Add custom header and sidebar background color setting and control.
    $wp_customize->add_setting('price_color', array('default' => $color_scheme[8], 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage'));
    $wp_customize->add_control(new WP_Customize_Color_Control($wp_customize, 'price_color', array('label' => esc_attr__('Price Color', 'kutetheme'), 'description' => esc_attr__('Applied to the price on wide screens.', 'kutetheme'), 'section' => 'colors')));
    // Add an additional description to the header image section.
    $wp_customize->get_section('header_image')->description = esc_attr__('Applied to the header on small screens and the sidebar on wide screens.', 'kutetheme');
}
Ejemplo n.º 26
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function maker_theme_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    // Add Social Media Section
    $wp_customize->add_section('social-media', array('title' => __('Social Media', 'maker'), 'priority' => 30, 'description' => __('Enter the URL to your account for each service for the icon to appear in the footer.', '')));
    // Add Twitter Setting
    $wp_customize->add_setting('twitter', array('default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'twitter', array('label' => __('Twitter', 'maker'), 'section' => 'social-media', 'settings' => 'twitter')));
    // Add Facebook Setting
    $wp_customize->add_setting('facebook', array('default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'facebook', array('label' => __('Facebook', 'maker'), 'section' => 'social-media', 'settings' => 'facebook')));
    // Add Instagram Setting
    $wp_customize->add_setting('instagram', array('default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_url_raw'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'Instagram', array('label' => __('Instagram', 'maker'), 'section' => 'social-media', 'settings' => 'instagram')));
    // Footer Contact Info
    $wp_customize->add_section('contact-info', array('title' => __('Contact Info (in footer)', 'maker'), 'priority' => 30, 'description' => __('', '')));
    // Add Twitter Setting
    $wp_customize->add_setting('email', array('default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'sanitize_email'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'email', array('label' => __('Email Address', 'maker'), 'section' => 'contact-info', 'settings' => 'email')));
    // Add Facebook Setting
    $wp_customize->add_setting('phone', array('default' => '', 'transport' => 'postMessage', 'sanitize_callback' => 'esc_html'));
    $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'phone', array('label' => __('Phone Number', 'maker'), 'section' => 'contact-info', 'settings' => 'phone')));
}
Ejemplo n.º 27
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function shapely_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    $wp_customize->get_setting('custom_logo')->transport = 'refresh';
    // Abort if selective refresh is not available.
    if (!isset($wp_customize->selective_refresh)) {
        return;
    }
    $wp_customize->selective_refresh->add_partial('blogname', array('selector' => '.site-title', 'render_callback' => function () {
        bloginfo('name');
    }));
    $wp_customize->selective_refresh->add_partial('footer_callout_text', array('selector' => '.footer-callout', 'render_callback' => function () {
        shapely_footer_callout();
    }));
    $wp_customize->selective_refresh->add_partial('footer_callout_btntext', array('selector' => '.footer-callout', 'render_callback' => function () {
        shapely_footer_callout();
    }));
    $wp_customize->selective_refresh->add_partial('footer_callout_link', array('selector' => '.footer-callout', 'render_callback' => function () {
        shapely_footer_callout();
    }));
    $wp_customize->selective_refresh->add_partial('blog_name', array('selector' => '.header-callout', 'render_callback' => function () {
        shapely_top_callout();
    }));
    $wp_customize->selective_refresh->add_partial('header_textcolor', array('selector' => '.header-callout', 'render_callback' => function () {
        shapely_top_callout();
    }));
}
Ejemplo n.º 28
0
/**
 * Add postMessage support for site title and description for the Customizer.
 *
 * @since Meed Networks 1.0
 *
 * @param WP_Customize_Manager $wp_customize Customizer object.
*/
function twentyfifteen_customize_register($wp_customize)
{
    //$color_scheme = twentyfifteen_get_color_scheme();
    $wp_customize->get_setting('blogname')->transport = 'refresh';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    //add control for the header and tagline
    $wp_customize->add_section('Home-Header', array('title' => __('Text Description For The Home', 'meednetworks'), 'priority' => 15));
    $wp_customize->add_setting('home_header', array('default' => 'Nigeria Leading Network Infrastructure', 'transport' => 'refresh'));
    $wp_customize->add_control('home_header', array('label' => __('header_text', 'meednetworks'), 'section' => 'Home-Header', 'type' => 'text', 'priority' => 1));
    $wp_customize->add_setting('home_header_text', array('default' => 'We have a strong focus on using information technology to improve the operational efficiencies of institutions and organisations of different sizes. From integrated networks, fiber optics, cabling systems, Wireless/LAN, telecom infrastructure, biometrics, test and network security, our portfolio of ground-breaking solutions speak volume about our experience. See why you should work with us?', 'transport' => 'refresh'));
    $wp_customize->add_control('home_header_text', array('label' => __('Home Header Text', 'meednetworks'), 'section' => 'Home-Header', 'type' => 'textarea', 'priority' => 2));
    // Add control for the blog scheme setting and control.
    $wp_customize->add_section('Blog_summary', array('title' => __('Blog Summary', 'meednetworks'), 'priority' => 30));
    $wp_customize->add_setting('Blog_post_header', array('default' => 'Blog Post header', 'transport' => 'refresh'));
    $wp_customize->add_control('Blog_post_header', array('label' => __('Blog Post', 'meednetworks'), 'section' => 'Blog_summary', 'type' => 'text', 'priority' => 1));
    $wp_customize->add_setting('Blog_post_sub', array('default' => 'Latest Blog Posts', 'transport' => 'refresh'));
    $wp_customize->add_control('Blog_post_sub', array('label' => __('Blog Post', 'meednetworks'), 'section' => 'Blog_summary', 'type' => 'text', 'priority' => 2));
    $wp_customize->add_setting('Blog_post_summary', array('default' => 'We use the Meed Blog as a medium to articulate and share some of the knowledge and experiences we gain from the field. The objective is simply to improve the industry.', 'transport' => 'refresh'));
    $wp_customize->add_control('Blog_post_summary', array('label' => __('Blog Post Text', 'meednetworks'), 'section' => 'Blog_summary', 'type' => 'textarea', 'priority' => 3));
    //footer texts
    // Add control for the blog scheme setting and control.
    $wp_customize->add_section('Footer_text', array('title' => __('Footer Bar', 'meednetworks'), 'priority' => 30));
    $wp_customize->add_setting('copyright', array('default' => '© Copyright 2014 Meed Networks Limited. Website by Ultractiv. All Rights Reserved.', 'transport' => 'refresh'));
    $wp_customize->add_control('copyright', array('label' => __('copyright', 'meednetworks'), 'section' => 'Footer_text', 'type' => 'text', 'priority' => 1));
}
Ejemplo n.º 29
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function tonal_customize_register($wp_customize)
{
    $wp_customize->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_image')->transport = 'postMessage';
}
Ejemplo n.º 30
0
/**
 * Add postMessage support for site title and description for the Theme Customizer.
 *
 * @param WP_Customize_Manager $wp_customize Theme Customizer object.
 */
function the_monday_customize_register($wp_customize)
{
    $wp_customize->get_setting('blogname')->transport = 'postMessage';
    $wp_customize->get_setting('blogdescription')->transport = 'postMessage';
    $wp_customize->get_setting('header_textcolor')->transport = 'postMessage';
    /*------------------------------------------------------------------------------------------------------------------------------*/
    /**
     * Theme info
     */
    $pro_themes_url = esc_url('https://accesspressthemes.com/wordpress-themes/');
    $the_monday_more_themes = __('View more Free Themes ', 'the-monday') . ': <a href="' . esc_url(admin_url() . '/themes.php?page=the-monday-themes') . '">' . __(' here', 'the-monday') . '</a>';
    $the_monday_pro_themes = __('View Pro Themes ', 'the-monday') . ': <a href="' . esc_url('https://accesspressthemes.com/wordpress-themes/') . '">' . __(' here', 'the-monday') . '</a>';
    $the_monday_uesful_plugins = __('AccessPress Useful Plugins ', 'the-monday') . ': <a href="' . esc_url('https://accesspressthemes.com/plugins/') . '">' . __(' here', 'the-monday') . '</a>';
    $the_monday_about_theme = __('The Monday is powerful features rich WordPress Free theme developed by AccessPress. ', 'the-monday');
    $wp_customize->add_section('the_monday_themeinfo', array('title' => __('Theme info', 'the-monday'), 'priority' => 99));
    // More Themes
    $wp_customize->add_setting('the_monday_more_themes', array('type' => 'theme_info', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr'));
    $wp_customize->add_control(new The_Monday_Theme_Info($wp_customize, 'the_monday_more_themes', array('section' => 'the_monday_themeinfo', 'label' => __('More Themes', 'the-monday'), 'description' => $the_monday_more_themes, 'priority' => 5)));
    //Pro Themes
    $wp_customize->add_setting('the_monday_pro_themes', array('type' => 'theme_info', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr'));
    $wp_customize->add_control(new The_Monday_Theme_Info($wp_customize, 'the_monday_pro_themes', array('section' => 'the_monday_themeinfo', 'label' => __('Pro Themes', 'the-monday'), 'description' => $the_monday_pro_themes, 'priority' => 5)));
    //Usesful Plugins
    $wp_customize->add_setting('the_monday_useful_plugins', array('type' => 'theme_info', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr'));
    $wp_customize->add_control(new The_Monday_Theme_Info($wp_customize, 'the_monday_useful_plugins', array('section' => 'the_monday_themeinfo', 'label' => __('Useful Plugins ', 'the-monday'), 'description' => $the_monday_uesful_plugins, 'priority' => 5)));
    //Usesful Plugins
    $wp_customize->add_setting('the_monday_about_theme', array('type' => 'theme_info', 'capability' => 'edit_theme_options', 'sanitize_callback' => 'esc_attr'));
    $wp_customize->add_control(new The_Monday_Theme_Info($wp_customize, 'the_monday_about_theme', array('section' => 'the_monday_themeinfo', 'label' => __('About The Monday ', 'the-monday'), 'description' => $the_monday_about_theme, 'priority' => 5)));
}