forked from CoderDojo/cd-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfooter.php
More file actions
17 lines (16 loc) · 686 Bytes
/
footer.php
File metadata and controls
17 lines (16 loc) · 686 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?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
*/
$timberContext = $GLOBALS['timberContext'];
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 );