'preset1-description' => '\'Preset 1\'',
'preset1-colors-0' => '#ef0015',
'preset1-colors-1' => '#fff4cc',
'preset1-styles-base-background' => '#ffffff',
'preset1-styles-base-text-color' => '#4f4e53',
'preset1-styles-base-text-active-color' => '#232529',
'preset1-styles-accent-color-1' => '#ef0015',
'preset1-styles-accent-color-2' => '#fff4cc',
'preset1-styles-menustyle-text-color' => '#ffffff',
'preset1-styles-menustyle-text-color-alt' => '#000000',
'preset1-styles-menustyle-text-color-active' => 'rgba(255,255,255, 0.7)',
'preset1-styles-menustyle-background-active' => 'rgba(255,255,255, 0)',
'preset1-styles-menustyle-sublevel-text-color' => '#000000',
'preset1-styles-menustyle-sublevel-text-color-active' => '#000000',
'preset1-styles-menustyle-sublevel-background' => '#ffffff',
'preset1-styles-menustyle-sublevel-background-active' => '#ffffff',
'preset1-styles-font-family-default' => '\'rubik, Helvetica, Tahoma, Geneva, Arial, sans-serif\'',
'preset1-styles-top-background' => '#ffffff',
'preset1-styles-top-text-color' => '#4f4e53',
'preset1-styles-navigation-background' => '#1a1c23',
'preset1-styles-navigation-text-color' => '#ffffff',
'preset1-styles-slideshow-background' => '#ffffff',
'preset1-styles-slideshow-text-color' => '#4f4e53',
'preset1-styles-header-background' => '#ffffff',
'preset1-styles-header-text-color' => '#4f4e53',
'preset1-styles-above-background' => '#ffffff',
'preset1-styles-above-text-color' => '#4f4e53',
'preset1-styles-feature-background' => '#ffffff',
'preset1-styles-feature-text-color' => '#4f4e53',
'preset1-styles-showcase-background' => '#ffffff',
'preset1-styles-showcase-text-color' => '#4f4e53',
'preset1-styles-utility-background' => '#ffffff',
'preset1-styles-utility-text-color' => '#4f4e53',
'preset1-styles-main-background' => '#ffffff',
'preset1-styles-main-text-color' => '#4f4e53',
'preset1-styles-sidebar-background' => '#1a1c23',
'preset1-styles-sidebar-text-color' => '#bdbdbe',
'preset1-styles-aside-background' => '#ffffff',
'preset1-styles-aside-text-color' => '#4f4e53',
'preset1-styles-expanded-background' => '#ffffff',
/**
* Get/set parsed file contents.
*
* @param string|array|null $var
* @return string|array
* @throws RuntimeException
*/
public function content($var = null)
{
if ($var !== null) {
$this->content = $this->check($var);
// Update RAW, too.
$this->raw = $this->encode($this->content);
} elseif ($this->content === null) {
// Decode RAW file.
try {
$this->content = $this->decode($this->raw());
} catch (Exception $e) {
throw new RuntimeException(sprintf('Failed to read %s: %s', $this->filename, $e->getMessage()), 500, $e);
}
}
return $this->content;
}
/**
* Save file.
*
* @param mixed $data Optional data to be saved, usually array.
* @return void
* @throws RuntimeException
*/
public function save($data = null)
{
if (null === $this->filename) {
throw new RuntimeException('Failed to save file: no filename');
}
/**
* Implements Universal File Reader.
*
* @package RocketTheme\Toolbox\File
* @author RocketTheme
* @license MIT
*/
class File extends AbstractFile
{
/**
* Get/set parsed file contents.
*
* @param string|null $var
* @return string
* @throws RuntimeException
*/
public function content($var = null)
{
/** @var string $content */
$content = parent::content($var);
return $content;
}
}
* @package RocketTheme\Toolbox\File
* @author RocketTheme
* @license MIT
*/
class PhpFile extends File
{
/** @var string */
protected $extension = '.php';
/** @var static[] */
static protected $instances = [];
/**
* @param array|null $var
* @return array
*/
public function content($var = null)
{
/** @var array $content */
$content = parent::content($var);
return $content;
}
/**
* Saves PHP file and invalidates opcache.
*
* @param mixed $data Optional data to be saved, usually array.
* @return void
* @throws RuntimeException
*/
public function save($data = null)
{
parent::save($data);
// Invalidate configuration file from the opcache.
if (null !== $this->filename && function_exists('opcache_invalidate')) {
@opcache_invalidate($this->filename, true);
}
}
// Compare checksum comment in the file.
if ($contents !== $this->checksum()) {
$this->setVariables($variables);
return true;
}
// In production mode we do not need to do any other checks.
return false;
}
$uri = Gantry::basename($out);
$metaFile = PhpFile::instance($locator->findResource("gantry-cache://theme/scss/{$uri}.php", true, true));
// Check if meta file exists.
if (!$metaFile->exists()) {
$this->setVariables($variables);
return true;
}
$content = $metaFile->content();
$metaFile->free();
// Check if filename in meta file matches.
if (empty($content['file']) || $content['file'] !== $out) {
$this->setVariables($variables);
return true;
}
// Check if meta timestamp matches to CSS file.
if (filemtime($path) !== $content['timestamp']) {
$this->setVariables($variables);
return true;
}
$this->setVariables($variables);
// Check if variables have been changed.
$oldVariables = isset($content['variables']) ? $content['variables'] : [];
// Note: Do not use strict check!
$this->compiler->setConfiguration(isset($gantry['configuration']) ? $gantry['configuration'] : 'default');
}
return $this->compiler->reset();
}
/**
* Returns URL to CSS file.
*
* If file does not exist, it will be created by using CSS compiler.
*
* @param string $name
* @return string
*/
public function css($name)
{
if (!isset($this->cssCache[$name])) {
$compiler = $this->compiler();
if ($compiler->needsCompile($name, [$this, 'getCssVariables'])) {
if (\GANTRY_DEBUGGER) {
Debugger::startTimer("css-{$name}", "Compiling CSS: {$name}");
Debugger::addMessage("Compiling CSS: {$name}");
}
$compiler->compileFile($name);
if (\GANTRY_DEBUGGER) {
Debugger::stopTimer("css-{$name}");
}
}
$this->cssCache[$name] = $compiler->getCssUrl($name);
}
return $this->cssCache[$name];
}
/**
* @return array
$styles = $this->getAssetsInLocation('styles', $location);
if (!$styles) {
return [];
}
$gantry = Gantry::instance();
/** @var Theme|null $theme */
$theme = isset($gantry['theme']) ? $gantry['theme'] : null;
/** @var Document $document */
$document = $gantry['document'];
foreach ($styles as $key => $style) {
if (isset($style['href'])) {
$url = $style['href'];
if ($theme && preg_match('|\.scss$|', $url)) {
// Compile SCSS files.
$url = $theme->css(Gantry::basename($url, '.scss'));
}
// Deal with streams and relative paths.
$url = $document::url($url, null, null, false);
$styles[$key]['href'] = $url;
}
}
return $styles;
}
/**
* @param string $location
* @return array
* @since 5.4.3
*/
public function getScripts($location = 'head')
{
$scripts = $this->getAssetsInLocation('scripts', $location);
'bootstrap.5' => 'registerBootstrap5',
'mootools' => 'registerMootools',
'mootools.framework' => 'registerMootools',
'mootools.core' => 'registerMootools',
'mootools.more' => 'registerMootoolsMore',
'lightcase' => 'registerLightcase',
'lightcase.init' => 'registerLightcaseInit',
];
public static function registerAssets()
{
static::registerFrameworks();
static::registerStyles();
static::registerScripts('head');
static::registerScripts('footer');
}
public static function registerStyles()
{
$styles = static::$stack[0]->getStyles();
foreach ($styles as $style) {
switch ($style[':type']) {
case 'file':
$array = explode('?', $style['href']);
$href = array_shift($array);
$version = array_shift($array) ?: false;
$name = isset($style['id']) ? $style['id'] : Gantry::basename($href, '.css');
if (strpos($version, '=')) {
$href .= '?' . $version;
$version = null;
}
\wp_enqueue_style($name, $href, [], $version, $style['media']);
break;
case 'inline':
$type = !empty($style['type']) ? $style['type'] : 'text/css';
self::$wp_styles[] = "<style type=\"{$type}\">{$style['content']}</style>";
break;
}
}
'jquery' => 'registerJquery',
'jquery.framework' => 'registerJquery',
'jquery.ui.core' => 'registerJqueryUiCore',
'jquery.ui.sortable' => 'registerJqueryUiSortable',
'bootstrap.2' => 'registerBootstrap2',
'bootstrap.3' => 'registerBootstrap3',
'bootstrap.4' => 'registerBootstrap4',
'bootstrap.5' => 'registerBootstrap5',
'mootools' => 'registerMootools',
'mootools.framework' => 'registerMootools',
'mootools.core' => 'registerMootools',
'mootools.more' => 'registerMootoolsMore',
'lightcase' => 'registerLightcase',
'lightcase.init' => 'registerLightcaseInit',
];
public static function registerAssets()
{
static::registerFrameworks();
static::registerStyles();
static::registerScripts('head');
static::registerScripts('footer');
}
public static function registerStyles()
{
$styles = static::$stack[0]->getStyles();
foreach ($styles as $style) {
switch ($style[':type']) {
case 'file':
$array = explode('?', $style['href']);
$href = array_shift($array);
$version = array_shift($array) ?: false;
$name = isset($style['id']) ? $style['id'] : Gantry::basename($href, '.css');
if (strpos($version, '=')) {
$href .= '?' . $version;
$version = null;
}
\wp_enqueue_style($name, $href, [], $version, $style['media']);
/** @var Config $config */
$config = $gantry['config'];
$wpautop = $config->get('content.general.wpautop.enabled', '1');
if ($wpautop == '0') {
\remove_filter('the_content', 'wpautop');
\remove_filter('comment_text', 'wpautop');
}
}
public function enqueue_scripts()
{
$gantry = Gantry::instance();
/** @var Document $document */
$document = $gantry['document'];
$document::registerAssets();
}
public function print_styles()
{
$styles = Gantry::instance()->styles();
if ($styles) {
echo implode("\n ", $styles) . "\n";
}
}
public function print_scripts()
{
$scripts = Gantry::instance()->scripts();
if ($scripts) {
echo implode("\n ", $scripts) . "\n";
}
}
public function print_inline_scripts()
{
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_actions Stores the number of times each action was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
* @since 2.8.0
*/
do_action( 'wp_print_footer_scripts' );
}
/**
* Wrapper for do_action( 'wp_enqueue_scripts' ).
*
* Allows plugins to queue scripts for the front end using wp_enqueue_script().
* Runs first in wp_head() where all is_home(), is_page(), etc. functions are available.
*
* @since 2.8.0
*/
function wp_enqueue_scripts() {
/**
* Fires when scripts and styles are enqueued.
*
* @since 2.8.0
*/
do_action( 'wp_enqueue_scripts' );
}
/**
* Prints the styles queue in the HTML head on admin pages.
*
* @since 2.8.0
*
* @global bool $concatenate_scripts
*
* @return array
*/
function print_admin_styles() {
global $concatenate_scripts;
$wp_styles = wp_styles();
script_concat_settings();
$wp_styles->do_concat = $concatenate_scripts;
$wp_styles->do_items( false );
$this->iterations[ $nesting_level ] = $this->priorities;
$num_args = count( $args );
do {
$this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
$priority = $this->current_priority[ $nesting_level ];
foreach ( $this->callbacks[ $priority ] as $the_ ) {
if ( ! $this->doing_action ) {
$args[0] = $value;
}
// Avoid the array_slice() if possible.
if ( 0 === $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
unset( $this->iterations[ $nesting_level ] );
unset( $this->current_priority[ $nesting_level ] );
--$this->nesting_level;
return $value;
}
/**
* Calls the callback functions that have been added to an action hook.
*
* @since 4.7.0
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
}
/**
* Processes the functions hooked into the 'all' hook.
*
* @since 4.7.0
*
* @param array $args Arguments to pass to the hook callbacks. Passed by reference.
*/
public function do_all_hook( &$args ) {
$nesting_level = $this->nesting_level++;
$this->iterations[ $nesting_level ] = $this->priorities;
do {
$priority = current( $this->iterations[ $nesting_level ] );
if ( ! isset( $wp_filter[ $hook_name ] ) ) {
if ( isset( $wp_filter['all'] ) ) {
array_pop( $wp_current_filter );
}
return;
}
if ( ! isset( $wp_filter['all'] ) ) {
$wp_current_filter[] = $hook_name;
}
if ( empty( $arg ) ) {
$arg[] = '';
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
* Calls the callback functions that have been added to an action hook, specifying arguments in an array.
*
* @since 2.1.0
*
* @see do_action() This function is identical, but the arguments passed to the
* functions hooked to `$hook_name` are supplied using an array.
*
* @global WP_Hook[] $wp_filter Stores all of the filters and actions.
* @global int[] $wp_actions Stores the number of times each action was triggered.
* @global string[] $wp_current_filter Stores the list of current filters with the current one last.
*
* @param string $hook_name The name of the action to be executed.
* @param array $args The arguments supplied to the functions hooked to `$hook_name`.
*/
function do_action_ref_array( $hook_name, $args ) {
* @param string $before The HTML to output before the date.
* @param string $after The HTML to output after the date.
*/
echo apply_filters( 'the_weekday_date', $the_weekday_date, $before, $after );
}
/**
* Fires the wp_head action.
*
* See {@see 'wp_head'}.
*
* @since 1.2.0
*/
function wp_head() {
/**
* Prints scripts or data in the head tag on the front end.
*
* @since 1.5.0
*/
do_action( 'wp_head' );
}
/**
* Fires the wp_footer action.
*
* See {@see 'wp_footer'}.
*
* @since 1.5.1
*/
function wp_footer() {
/**
* Prints scripts or data before the closing body tag on the front end.
*
* @since 1.5.1
*/
do_action( 'wp_footer' );
}
/**
* Fires the wp_body_open action.
// Use empty 'catch' block and not 'finally', because finally needs PHP 5.5 to work.
} catch ( \Exception $e ) {}
return $twig;
}
/**
*
*
* @return string
*/
public function call() {
$args = $this->_parse_args(func_get_args(), $this->_args);
$callable = (isset($this->_class)) ? array($this->_class, $this->_function) : $this->_function;
if ( $this->_use_ob ) {
return Helper::ob_function($callable, $args);
} else {
return call_user_func_array($callable, $args);
}
}
/**
*
*
* @param array $args
* @param array $defaults
* @return array
*/
private function _parse_args( $args, $defaults ) {
$_arg = reset($defaults);
foreach ( $args as $index => $arg ) {
$defaults[$index] = is_null($arg) ? $_arg : $arg;
$_arg = next($defaults);
}
return $defaults;
}
// Use empty 'catch' block and not 'finally', because finally needs PHP 5.5 to work.
} catch ( \Exception $e ) {}
return $twig;
}
/**
*
*
* @return string
*/
public function call() {
$args = $this->_parse_args(func_get_args(), $this->_args);
$callable = (isset($this->_class)) ? array($this->_class, $this->_function) : $this->_function;
if ( $this->_use_ob ) {
return Helper::ob_function($callable, $args);
} else {
return call_user_func_array($callable, $args);
}
}
/**
*
*
* @param array $args
* @param array $defaults
* @return array
*/
private function _parse_args( $args, $defaults ) {
$_arg = reset($defaults);
foreach ( $args as $index => $arg ) {
$defaults[$index] = is_null($arg) ? $_arg : $arg;
$_arg = next($defaults);
}
return $defaults;
}
use Timber\Helper;
/**
* FunctionWrapper Class.
*
* With Timber, we want to prepare all the data before we echo content through a render function. Some functionality in WordPress directly echoes output instead of returning it. This class makes it easier to store the results of an echoing function by using ob_start() and ob_end_clean() behind the scenes.
*
* @package Timber
*/
class FunctionWrapper {
private $_class;
private $_function;
private $_args;
private $_use_ob;
public function __toString() {
try {
return (string) $this->call();
} catch ( \Exception $e ) {
return 'Caught exception: '.$e->getMessage()."\n";
}
}
/**
*
*
* @param callable $function
* @param array $args
* @param bool $return_output_buffer
*/
public function __construct( $function, $args = array(), $return_output_buffer = false ) {
if ( is_array($function) ) {
if ( (is_string($function[0]) && class_exists($function[0])) || gettype($function[0]) === 'object' ) {
$this->_class = $function[0];
}
if ( is_string($function[1]) ) {
$this->_function = $function[1];
// line 3
public function block_head_title($context, array $blocks = [])
{
// line 4
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "charset", []), "html", null, true);
echo "\" />
<link rel=\"profile\" href=\"http://gmpg.org/xfn/11\" />
<link rel=\"pingback\" href=\"";
// line 6
echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "pingback_url", []), "html", null, true);
echo "\" />";
}
// line 9
public function block_head_application($context, array $blocks = [])
{
// line 10
echo ($context["wp_head"] ?? null);
}
// line 13
public function block_head_platform($context, array $blocks = [])
{
// line 14
$this->displayParentBlock("head_platform", $context, $blocks);
echo "
<link rel=\"stylesheet\" href=\"";
// line 15
echo twig_escape_filter($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-engine://css-compiled/wordpress.css"), "html", null, true);
echo "\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"";
// line 16
echo twig_escape_filter($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("gantry-theme://style.css"), "html", null, true);
echo "\" type=\"text/css\" />";
}
// line 19
public function block_head($context, array $blocks = [])
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif (false !== $parent = $this->getParent($context)) {
$parent->displayBlock($name, $context, array_merge($this->blocks, $blocks), false);
$this->displayBlock('head_overrides', $context, $blocks);
$content = ob_get_clean();
$assetFunction($content, $location, $priority);
// line 51
echo "<head>
";
// line 52
echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "head_top"], "method"), "
");
echo "
";
// line 53
$this->displayBlock('head_meta', $context, $blocks);
// line 79
$this->displayBlock('head_title', $context, $blocks);
// line 83
echo "
";
// line 84
$this->displayBlock('head_application', $context, $blocks);
// line 88
echo "
";
// line 89
$this->displayBlock('head_ie_stylesheets', $context, $blocks);
// line 92
$this->displayBlock('head', $context, $blocks);
// line 93
$this->displayBlock('head_custom', $context, $blocks);
// line 98
echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "head_bottom"], "method"), "
");
echo "
</head>
";
}
// line 8
public function block_head_stylesheets($context, array $blocks = [])
{
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
parent::__construct($env);
$this->blocks = [
'head_title' => [$this, 'block_head_title'],
'head_application' => [$this, 'block_head_application'],
'head_platform' => [$this, 'block_head_platform'],
'head' => [$this, 'block_head'],
];
}
protected function doGetParent(array $context)
{
// line 1
return "@nucleus/page_head.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$this->parent = $this->loadTemplate("@nucleus/page_head.html.twig", "partials/page_head.html.twig", 1);
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 3
public function block_head_title($context, array $blocks = [])
{
// line 4
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "charset", []), "html", null, true);
echo "\" />
<link rel=\"profile\" href=\"http://gmpg.org/xfn/11\" />
<link rel=\"pingback\" href=\"";
// line 6
echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "pingback_url", []), "html", null, true);
echo "\" />";
}
// line 9
public function block_head_application($context, array $blocks = [])
{
// line 10
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Exception $e) {
$e = new RuntimeError(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Exception $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
* @internal
*/
public function __construct(Environment $env, Template $template)
{
$this->env = $env;
$this->template = $template;
}
/**
* Renders the template.
*
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*/
public function render($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_num_args() > 1 ? func_get_arg(1) : []);
}
/**
* Displays the template.
*
* @param array $context An array of parameters to pass to the template
*/
public function display($context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_num_args() > 1 ? func_get_arg(1) : []);
}
/**
* Checks if a block is defined.
*
* @param string $name The block name
* @param array $context An array of parameters to pass to the template
*
@trigger_error(sprintf('The %s method is deprecated since version 1.22 and will be removed in Twig 2.0.', __METHOD__), \E_USER_DEPRECATED);
return $this->templateClassPrefix;
}
/**
* Renders a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to pass to the template
*
* @return string The rendered template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = [])
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
* @param string|TemplateWrapper $name The template name
* @param array $context An array of parameters to pass to the template
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function display($name, array $context = [])
{
$this->load($name)->display($context);
}
/**
* Loads a template.
*
/**
* @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) {
Debugger::addMessage('Selecting outline (rules, matches, scores):', 'debug');
Debugger::addMessage($assignments->getPage(), 'debug');
Debugger::addMessage($assignments->matches(), 'debug');
Debugger::addMessage($assignments->scores(), 'debug');
}
$this->setLayout($selected);
}
public function widgets_init()
{
$gantry = Gantry::instance();
* @author RocketTheme http://www.rockettheme.com
* @copyright Copyright (C) 2007 - 2020 RocketTheme, LLC
* @license GNU/GPLv2 and later
*
* http://www.gnu.org/licenses/gpl-2.0.html
*/
defined('ABSPATH') or die;
/*
* Third party plugins that hijack the theme will call wp_head() to get the header template.
* We use this to start our output buffer and render into the views/page-plugin.html.twig template in footer.php
*/
$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);
$GLOBALS['timberContext'] = $context;
ob_start();
extract( $wp_query->query_vars, EXTR_SKIP );
}
if ( isset( $s ) ) {
$s = esc_attr( $s );
}
/**
* Fires before a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
* @since 6.1.0
*
* @param string $_template_file The full path to the template file.
* @param bool $load_once Whether to require_once or require.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'wp_after_load_template', $_template_file, $load_once, $args );
}
$located = '';
foreach ( (array) $template_names as $template_name ) {
if ( ! $template_name ) {
continue;
}
if ( file_exists( $wp_stylesheet_path . '/' . $template_name ) ) {
$located = $wp_stylesheet_path . '/' . $template_name;
break;
} elseif ( $is_child_theme && file_exists( $wp_template_path . '/' . $template_name ) ) {
$located = $wp_template_path . '/' . $template_name;
break;
} elseif ( file_exists( ABSPATH . WPINC . '/theme-compat/' . $template_name ) ) {
$located = ABSPATH . WPINC . '/theme-compat/' . $template_name;
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
/**
* Requires the template file with WordPress environment.
*
* The globals are set up for the template file to ensure that the WordPress
* environment is available from within the function. The query variables are
* also available.
*
* @since 1.5.0
* @since 5.5.0 The `$args` parameter was added.
*
* @global array $posts
* @global WP_Post $post Global post object.
* @global bool $wp_did_header
* @global WP_Query $wp_query WordPress Query object.
* @global WP_Rewrite $wp_rewrite WordPress rewrite component.
* Fires before the header template file is loaded.
*
* @since 2.1.0
* @since 2.8.0 The `$name` parameter was added.
* @since 5.5.0 The `$args` parameter was added.
*
* @param string|null $name Name of the specific header file to use. Null for the default header.
* @param array $args Additional arguments passed to the header template.
*/
do_action( 'get_header', $name, $args );
$templates = array();
$name = (string) $name;
if ( '' !== $name ) {
$templates[] = "header-{$name}.php";
}
$templates[] = 'header.php';
if ( ! locate_template( $templates, true, true, $args ) ) {
return false;
}
}
/**
* Loads footer template.
*
* Includes the footer template for a theme or if a name is specified then a
* specialized footer will be included.
*
* For the parameter, if the file is called "footer-special.php" then specify
* "special".
*
* @since 1.5.0
* @since 5.5.0 A return value was added.
* @since 5.5.0 The `$args` parameter was added.
*
* @param string $name The name of the specialized footer.
* @param array $args Optional. Additional arguments passed to the footer template.
* Default empty array.
<?php
/**
* View: Default Template for Events
*
* Override this template in your own theme by creating a file at:
* [your-theme]/tribe/events/v2/default-template.php
*
* See more documentation about our views templating system.
*
* @link http://evnt.is/1aiy
*
* @version 5.0.0
*/
use Tribe\Events\Views\V2\Template_Bootstrap;
get_header();
echo tribe( Template_Bootstrap::class )->get_view_html();
get_footer();
}
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
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';