get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; $wp_customize->get_section('header_image')->title = __( 'Header Settings', 'lightweightly-blog' ); $wp_customize->get_section('colors')->title = __( 'Other Colors', 'lightweightly-blog' ); $wp_customize->selective_refresh->add_partial( 'custom_logo', array( 'selector' => '.header-titles [class*=site-]:not(.logo-container .logofont)', 'render_callback' => 'lightweightly_blog_customize_partial_site_logo', ) ); $wp_customize->selective_refresh->add_partial( 'retina_logo', array( 'selector' => '.header-titles [class*=site-]:not(.logo-container .logofont)', 'render_callback' => 'lightweightly_blog_customize_partial_site_logo', ) ); if ( isset( $wp_customize->selective_refresh ) ) { $wp_customize->selective_refresh->add_partial( 'blogname', array( 'selector' => '.logo-container .logofont', 'render_callback' => 'lightweightly_blog_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.logo-container .logofont', 'render_callback' => 'lightweightly_blog_customize_partial_blogdescription', ) ); } $wp_customize->add_section( 'footer_settings', array( 'title' => __('Footer Settings','lightweightly-blog'), 'priority' => 1, 'capability' => 'edit_theme_options', ) ); $wp_customize->add_setting( 'footer_headline_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_headline_color', array( 'label' => __( 'Headline Color', 'lightweightly-blog' ), 'section' => 'footer_settings', 'priority' => 1, 'settings' => 'footer_headline_color', ) ) ); $wp_customize->add_setting( 'footer_text_color', array( 'default' => '#656565', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_text_color', array( 'label' => __( 'Text Color', 'lightweightly-blog' ), 'section' => 'footer_settings', 'priority' => 1, 'settings' => 'footer_text_color', ) ) ); $wp_customize->add_setting( 'footer_link_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_link_color', array( 'label' => __( 'Link Color', 'lightweightly-blog' ), 'section' => 'footer_settings', 'priority' => 1, 'settings' => 'footer_link_color', ) ) ); $wp_customize->add_setting( 'footer_border_color', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_border_color', array( 'label' => __( 'Border Color', 'lightweightly-blog' ), 'section' => 'footer_settings', 'priority' => 1, 'settings' => 'footer_border_color', ) ) ); $wp_customize->add_setting( 'footer_background_color', array( 'default' => '#151b26', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'footer_background_color', array( 'label' => __( 'Background Color', 'lightweightly-blog' ), 'section' => 'footer_settings', 'priority' => 1, 'settings' => 'footer_background_color', ) ) ); $wp_customize->add_setting( 'only_show_header_frontpage', array( 'default' => 0, 'sanitize_callback' => 'sanitize_text_field', ) ); $wp_customize->add_control( 'only_show_header_frontpage', array( 'label' => __( 'Only show header image on front page', 'lightweightly-blog' ), 'section' => 'header_image', 'priority' => 1, 'settings' => 'only_show_header_frontpage', 'type' => 'checkbox', ) ); $wp_customize->add_setting( 'header_img_text', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'header_img_text', array( 'label' => __( "Title", 'lightweightly-blog' ), 'section' => 'header_image', 'type' => 'text', 'priority' => 1, ) ); $wp_customize->add_setting( 'header_img_text_tagline', array( 'type' => 'theme_mod', 'sanitize_callback' => 'sanitize_text_field', 'capability' => 'edit_theme_options', ) ); $wp_customize->add_control( 'header_img_text_tagline', array( 'label' => __( "Tagline", 'lightweightly-blog' ), 'section' => 'header_image', 'type' => 'text', 'priority' => 1, ) ); $wp_customize->add_setting( 'header_img_textcolor', array( 'default' => '#fff', 'sanitize_callback' => 'sanitize_hex_color', 'transport' => 'postMessage', ) ); $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'header_img_textcolor', array( 'label' => __( 'Text Color', 'lightweightly-blog' ), 'section' => 'header_image', 'priority' => 1, 'settings' => 'header_img_textcolor', ) ) ); } add_action( 'customize_register', 'lightweightly_blog_customize_register', 99999 ); if(! function_exists('lightweightly_blog_customizer_css_final_output' ) ): function lightweightly_blog_customizer_css_final_output(){ ?> 'Social Share and Follow Buttons', 'slug' => 'superb-social-share-and-follow-buttons', 'required' => false, ), array( 'name' => 'Tables', 'slug' => 'superb-tables', 'required' => false, ), array( 'name' => 'Coupon Reveal Buttons', 'slug' => 'coupon-reveal-button', 'required' => false, ), ); $config = array( 'id' => 'lightweightly-blog', // Unique ID for hashing notices for multiple instances of TGMPA. 'default_path' => '', // Default absolute path to bundled plugins. 'menu' => 'tgmpa-install-plugins', // Menu slug. 'has_notices' => true, // Show admin notices or not. 'dismissable' => true, // If false, a user cannot dismiss the nag message. 'dismiss_msg' => '', // If 'dismissable' is false, this message will be output at top of nag. 'is_automatic' => false, // Automatically activate plugins after installation or not. 'message' => '', // Message to output right before the plugins table. ); tgmpa( $plugins, $config ); }