forked from timber/starter-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
/
footer.php
21 lines (20 loc) · 787 Bytes
/
footer.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
/**
* Third party plugins that hijack the theme will call wp_footer() to get the footer template.
* We use this to end our output buffer (started in header.php) and render into the view/page-plugin.twig template.
*
* If you're not using a plugin that requries this behavior (ones that do include Events Calendar Pro and
* WooCommerce) you can delete this file and header.php
*
* @package WordPress
* @subpackage Timber
* @since Timber 0.1
*/
$timberContext = $GLOBALS['timberContext']; // @codingStandardsIgnoreFile
if ( ! isset( $timberContext ) ) {
throw new \Exception( 'Timber context not set in footer.' );
}
$timberContext['content'] = ob_get_contents();
ob_end_clean();
$templates = array( 'page-plugin.twig' );
Timber::render( $templates, $timberContext );