-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-builder.php
57 lines (39 loc) · 1.7 KB
/
template-builder.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
/**
* Template Name: Builder Template
*/
get_header();
?>
<?php do_action( 'spine_theme_template_before_main', 'page.php' ); ?>
<main id="wsuwp-main" class="spine-blank-template">
<?php do_action( 'spine_theme_template_before_headers', 'page.php' ); ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php wsuwp_spine_get_template_part( 'page.php', 'parts/headers' ); ?>
<?php do_action( 'spine_theme_template_after_headers', 'page.php' ); ?>
<?php wsuwp_spine_get_template_part( 'page.php', 'parts/featured-images' ); ?>
<?php do_action( 'spine_theme_template_before_content', 'page.php' ); ?>
<div id="page-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
/**
* `the_content` is fired on builder template pages while it is saved
* rather than while it is output in order for some advanced tags to
* survive the process and to avoid autop issues.
*/
remove_filter( 'the_content', 'wpautop', 10 );
add_filter( 'wsu_content_syndicate_host_data', 'spine_filter_local_content_syndicate_item', 10, 3 );
the_content();
remove_filter( 'wsu_content_syndicate_host_data', 'spine_filter_local_content_syndicate_item', 10 );
add_filter( 'the_content', 'wpautop', 10 );
?>
</div><!-- #post -->
<?php
endwhile;
endif;
?>
<?php do_action( 'spine_theme_template_after_content', 'page.php' ); ?>
<?php do_action( 'spine_theme_template_before_footer', 'page.php' ); ?>
<?php wsuwp_spine_get_template_part( 'page.php', 'parts/footers' ); ?>
<?php do_action( 'spine_theme_template_after_footer', 'page.php' ); ?>
</main>
<?php do_action( 'spine_theme_template_after_main', 'page.php' ); ?>
<?php get_footer();