Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
dmd-wp-theme/footer.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
executable file
13 lines (13 sloc)
518 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. | |
*/ | |
$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 ); |