footer.php 787 B

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