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', 'render_callback' => 'actify_customize_partial_blogname', ) ); $wp_customize->selective_refresh->add_partial( 'blogdescription', array( 'selector' => '.site-description', 'render_callback' => 'actify_customize_partial_blogdescription', ) ); $wp_customize->selective_refresh->add_partial( 'actify_cover_title', array( 'selector' => '.gs-cover-title', 'render_callback' => 'actify_customize_partial_cover_title', ) ); $wp_customize->selective_refresh->add_partial( 'actify_cover_subtitle', array( 'selector' => '.gs-cover-subtitle', 'render_callback' => 'actify_customize_partial_cover_subtitle', ) ); } include get_template_directory() . '/inc/customizer/theme-options.php'; } add_action( 'customize_register', 'actify_customize_register' ); /** * Render the site title for the selective refresh partial. * * @return void */ function actify_customize_partial_blogname() { bloginfo( 'name' ); } /** * Render the site tagline for the selective refresh partial. * * @return void */ function actify_customize_partial_blogdescription() { bloginfo( 'description' ); } function actify_customize_partial_cover_title() { echo esc_html( get_theme_mod( 'actify_cover_title' ) ); } function actify_customize_partial_cover_subtitle() { echo esc_html( get_theme_mod( 'actify_cover_subtitle' ) ); } /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function actify_customize_preview_js() { wp_enqueue_script( 'actify-customizer', get_template_directory_uri() . '/assets/js/customizer.js', array( 'customize-preview' ), '20151215', true ); } add_action( 'customize_preview_init', 'actify_customize_preview_js' ); // Add Styles to the Customizer function actify_customizer_css() { wp_enqueue_style( 'actify-customizer-css', get_template_directory_uri() . '/inc/customizer/customizer.css' ); } add_action( 'customize_controls_print_styles', 'actify_customizer_css' ); // Custom CSS output for theme options function actify_custom_css_output() { ?>