示例#1
0
function hocwp_article_before($post_class = '', $tag = 'article')
{
    $article = '<' . $tag . ' ';
    ob_start();
    post_class($post_class);
    $article .= ob_get_clean();
    $article .= ' data-id="' . get_the_ID() . '"';
    if (current_theme_supports('hocwp-schema')) {
        ob_start();
        hocwp_html_tag_attributes('article', 'post');
        $article .= ob_get_clean();
    }
    $article .= '>';
    $article = apply_filters('hocwp_article_before', $article);
    echo $article;
}
function hocwp_theme_site_main_before($class = '', $outer_class = '')
{
    $outer_class = apply_filters('hocwp_content_area_class', $outer_class);
    hocwp_add_string_with_space_before($class, 'site-main');
    hocwp_add_string_with_space_before($outer_class, 'content-area');
    ?>
	<div id="primary" class="<?php 
    echo $outer_class;
    ?>
">
	<main id="main" class="<?php 
    echo $class;
    ?>
"<?php 
    hocwp_html_tag_attributes('main', 'site_main');
    ?>
>
	<?php 
}
示例#3
0
>
<?php 
do_action('hocwp_open_body');
do_action('hocwp_before_site');
?>
<div id="page" class="hfeed site">
	<div class="site-inner">
		<?php 
if (!$maintenance_mode) {
    ?>
			<?php 
    do_action('hocwp_before_site_header');
    ?>
			<header id="masthead"
			        class="site-header clearfix"<?php 
    hocwp_html_tag_attributes('header', 'masthead');
    ?>
>
				<?php 
    hocwp_theme_get_module('header');
    ?>
			</header><!-- .site-header -->
			<?php 
    do_action('hocwp_after_site_header');
    ?>
		<?php 
}
?>
		<?php 
do_action('hocwp_before_site_content');
?>
示例#4
0
if (!function_exists('add_filter')) {
    exit;
}
$maintenance_mode = hocwp_in_maintenance_mode();
?>
</div><!-- .site-content -->
<?php 
do_action('hocwp_after_site_content');
if (!$maintenance_mode) {
    ?>
	<?php 
    do_action('hocwp_before_site_footer');
    ?>
	<footer id="colophon" class="site-footer clearfix"<?php 
    hocwp_html_tag_attributes('footer', 'site_footer');
    ?>
>
		<?php 
    hocwp_theme_get_module('footer');
    ?>
	</footer><!-- .site-footer -->
	<?php 
    do_action('hocwp_after_site_footer');
}
?>
</div><!-- .site-inner -->
</div><!-- .site -->
<?php 
if (!$maintenance_mode) {
    do_action('hocwp_after_site');