Example #1
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();
    }));
}
Example #2
0
								</div>
							</div>
						</div>
						<!--end of module group-->
					</div>
				</div>
			</nav><!-- #site-navigation -->
		</div>
	</header><!-- #masthead -->
	<div id="content" class="main-container">
		<?php 
if (!is_page_template('template-home.php')) {
    ?>
			<div class="header-callout">
				<?php 
    shapely_top_callout();
    ?>
			</div>
		<?php 
}
?>

		<section class="content-area <?php 
echo get_theme_mod('top_callout', true) ? '' : ' pt0 ';
?>
">
			<div id="main" class="<?php 
echo !is_page_template('template-home.php') ? 'container' : '';
?>
"
			     role="main">