get_setting( 'blogname' )->transport = 'postMessage'; $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; // define default value to WP buil-in favicon //$wp_customize->get_setting('site_icon')->default = get_stylesheet_directory_uri() . '/img/favicon.png'; //$wp_customize->get_setting('site_icon')->default = '0'; $wp_customize->get_setting('header_textcolor')->default = '3bc0c3'; //print 'tc: $wp_customize... : '; //var_dump($wp_customize->get_setting( 'blogname' )->default); //var_dump($wp_customize->get_control( 'blogname' )->label); //var_dump($wp_customize->get_setting( 'site_icon' )->default); //$wp_customize->get_setting( 'footer_backgroung' )->transport = 'postMessage'; // Warning: Creating default object from empty value in D:\storage\codestorage\wp-test.alphabettheme.local\web\wp-content\themes\alphabet\inc\customizer.php on line 25 // Rename the edfault label 'Header Text Color' to "Site Title Text Color" because this only affects the site title in this theme. $wp_customize->get_control( 'header_textcolor' )->label = __( 'Site Title Text Color', 'alphabet' ); // 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 & Tagline', 'alphabet' ); /** * Custom Header */ require get_template_directory() . '/inc/custom-header.php'; /** * Custom Footer */ require get_template_directory() . '/inc/custom-footer.php'; /** * Custom Menu */ require get_template_directory() . '/inc/custom-menu.php'; /** * Custom Logo */ require get_template_directory() . '/inc/custom-logo.php'; /** * Custom Fonts */ require get_template_directory() . '/inc/custom-fonts.php'; /** * Custom Other */ require get_template_directory() . '/inc/custom-other.php'; // Hide core sections/controls when they aren't used on the current page. // https://developer.wordpress.org/themes/advanced-topics/customizer-api/#contextual-controls-sections-and-panels /*$wp_customize->get_section( 'header_image' )->active_callback = 'is_front_page'; $wp_customize->get_control( 'blogdescription' )->active_callback = 'is_front_page'; * */ } add_action( 'customize_register', 'alphabet_customize_register' ); function alphabet_custom_css_output() { echo ''; echo ''; } add_action( 'wp_head', 'alphabet_custom_css_output'); /** * Bind JS handlers to make Customizer preview reload changes asynchronously. * * see https://codex.wordpress.org/Plugin_API/Action_Reference/customize_preview_init * * @since Alphabet 1.0 */ function alphabet_customize_preview_js() { wp_enqueue_script( 'alphabet_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20131205', true ); } add_action( 'customize_preview_init', 'alphabet_customize_preview_js' );