ParseError
syntax error, unexpected end of file, expecting ']' ParseError thrown with message "syntax error, unexpected end of file, expecting ']'" Stacktrace: #23 ParseError in /home/michelelaz/www/wp-content/cache/gantry5/g5_helium/compiled/blueprints/14a0b25bbaf52be4f929b306c08ad58c.php:1503 #22 Gantry\Component\Config\CompiledBase:loadCompiledFile in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/CompiledBase.php:108 #21 Gantry\Component\Config\CompiledBase:load in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Services/ConfigServiceProvider.php:72 #20 Gantry\Framework\Services\ConfigServiceProvider:blueprints in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Services/ConfigServiceProvider.php:31 #19 Gantry\Framework\Services\ConfigServiceProvider:Gantry\Framework\Services\{closure} in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/pimple/pimple/src/Pimple/Container.php:118 #18 Pimple\Container:offsetGet in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Services/ConfigServiceProvider.php:101 #17 Gantry\Framework\Services\ConfigServiceProvider:Gantry\Framework\Services\{closure} in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/Config.php:238 #16 Gantry\Component\Config\Config:blueprint in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Component/Config/Config.php:145 #15 Gantry\Component\Config\Config:getJoined in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:705 #14 Gantry\Framework\Theme:getContent in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:374 #13 Gantry\Framework\Theme:loadAtoms in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Template.php:675 #12 Twig_Template:getAttribute in /home/michelelaz/www/wp-content/cache/gantry5/g5_helium/twig/a5/a5b56863f867a5c2d95e052351408a68770ab971e44c6fe5aeec65796b11c01a.php:30 #11 __TwigTemplate_11713311489bf7408b5a74ad7f13e806a998fccc16dee6b898da5e2637db5979:doDisplay in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Template.php:432 #10 Twig_Template:displayWithErrorHandling in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Template.php:403 #9 Twig_Template:display in /home/michelelaz/www/wp-content/cache/gantry5/g5_helium/twig/fb/fb0be45b3b039ba988fbdb7f19357853f9b049fedac7cf1749f06be0d439559e.php:27 #8 __TwigTemplate_cdd5787c6a12fe8e17aefb90697e3bdb08f36f0a7b090fdc2a69d9afd2004a7b:doDisplay in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Template.php:432 #7 Twig_Template:displayWithErrorHandling in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Template.php:403 #6 Twig_Template:display in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Template.php:411 #5 Twig_Template:render in /home/michelelaz/www/wp-content/plugins/gantry5/src/vendor/twig/twig/lib/Twig/Environment.php:362 #4 Twig_Environment:render in /home/michelelaz/www/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #3 Gantry\Framework\Theme:render in /home/michelelaz/www/wp-content/themes/g5_helium/page.php:36 #2 include in /home/michelelaz/www/wp-includes/template-loader.php:74 #1 require_once in /home/michelelaz/www/wp-blog-header.php:19 #0 require in /home/michelelaz/www/index.php:17
Stack frames (24)
23
ParseError
/
home
/
michelelaz
/
www
/
wp-content
/
cache
/
gantry5
/
g5_helium
/
compiled
/
blueprints
/
14a0b25bbaf52be4f929b306c08ad58c.php
1503
22
Gantry
\
Component
\
Config
\
CompiledBase
loadCompiledFile
/
classes
/
Gantry
/
Component
/
Config
/
CompiledBase.php
108
21
Gantry
\
Component
\
Config
\
CompiledBase
load
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
72
20
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
blueprints
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
31
19
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
Gantry
\
Framework
\
Services
\
{closure}
/
vendor
/
pimple
/
pimple
/
src
/
Pimple
/
Container.php
118
18
Pimple
\
Container
offsetGet
/
classes
/
Gantry
/
Framework
/
Services
/
ConfigServiceProvider.php
101
17
Gantry
\
Framework
\
Services
\
ConfigServiceProvider
Gantry
\
Framework
\
Services
\
{closure}
/
classes
/
Gantry
/
Component
/
Config
/
Config.php
238
16
Gantry
\
Component
\
Config
\
Config
blueprint
/
classes
/
Gantry
/
Component
/
Config
/
Config.php
145
15
Gantry
\
Component
\
Config
\
Config
getJoined
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
705
14
Gantry
\
Framework
\
Theme
getContent
/
classes
/
Gantry
/
Component
/
Theme
/
ThemeTrait.php
374
13
Gantry
\
Framework
\
Theme
loadAtoms
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Template.php
675
12
Twig_Template
getAttribute
/
home
/
michelelaz
/
www
/
wp-content
/
cache
/
gantry5
/
g5_helium
/
twig
/
a5
/
a5b56863f867a5c2d95e052351408a68770ab971e44c6fe5aeec65796b11c01a.php
30
11
__TwigTemplate_11713311489bf7408b5a74ad7f13e806a998fccc16dee6b898da5e2637db5979
doDisplay
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Template.php
432
10
Twig_Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Template.php
403
9
Twig_Template
display
/
home
/
michelelaz
/
www
/
wp-content
/
cache
/
gantry5
/
g5_helium
/
twig
/
fb
/
fb0be45b3b039ba988fbdb7f19357853f9b049fedac7cf1749f06be0d439559e.php
27
8
__TwigTemplate_cdd5787c6a12fe8e17aefb90697e3bdb08f36f0a7b090fdc2a69d9afd2004a7b
doDisplay
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Template.php
432
7
Twig_Template
displayWithErrorHandling
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Template.php
403
6
Twig_Template
display
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Template.php
411
5
Twig_Template
render
/
vendor
/
twig
/
twig
/
lib
/
Twig
/
Environment.php
362
4
Twig_Environment
render
/
classes
/
Gantry
/
Framework
/
Theme.php
141
3
Gantry
\
Framework
\
Theme
render
/
home
/
michelelaz
/
www
/
wp-content
/
themes
/
g5_helium
/
page.php
36
2
include
/
home
/
michelelaz
/
www
/
wp-includes
/
template-loader.php
74
1
require_once
/
home
/
michelelaz
/
www
/
wp-blog-header.php
19
0
require
/
home
/
michelelaz
/
www
/
index.php
17
                'type' => 'enable.enable',
                'label' => 'Framework',
                'default' => 0,
                'name' => 'particles.frameworks.jquery.enabled'
            ],
            'particles.frameworks.jquery.ui_core' => [
                'type' => 'enable.enable',
                'label' => 'UI Core',
                'default' => 0,
                'name' => 'particles.frameworks.jquery.ui_core'
            ],
            'particles.frameworks.jquery.ui_sortable' => [
                'type' => 'enable.enable',
                'label' => 'UI Sortable',
                'default' => 0,
                'name' => 'particles.frameworks.jquery.ui_sortable'
            ],
            'particles.frameworks.bootstrap2' => [
                'type' => '_parent',
            
    }
 
    /**
     * Function gets called when cached configuration is saved.
     */
    public function modified() {}
 
    /**
     * Load the configuration.
     *
     * @return mixed
     */
    public function load()
    {
        if ($this->object) {
            return $this->object;
        }
 
        $filename = $this->createFilename();
        if (!$this->loadCompiledFile($filename) && $this->loadFiles()) {
            $this->saveCompiledFile($filename);
        }
 
        return $this->object;
    }
 
    /**
     * Returns checksum from the configuration files.
     *
     * You can set $this->checksum = false to disable this check.
     *
     * @return bool|string
     */
    public function checksum()
    {
        if (!isset($this->checksum)) {
            $this->checksum = md5(json_encode($this->files) . $this->version);
        }
 
        return $this->checksum;
            return $config;
        };
    }
 
    public static function blueprints(Container $container)
    {
        /** @var UniformResourceLocator $locator */
        $locator = $container['locator'];
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/blueprints', true, true);
 
        $files = [];
        $paths = $locator->findResources('gantry-particles://');
        $files += (new ConfigFileFinder)->setBase('particles')->locateFiles($paths);
        $paths = $locator->findResources('gantry-blueprints://');
        $files += (new ConfigFileFinder)->locateFiles($paths);
 
        $config = new CompiledBlueprints($cache, $files, GANTRY5_ROOT);
 
        return $config->load();
    }
 
    public static function load(Container $container, $name = 'default', $combine = true, $withDefaults = true)
    {
        /** @var UniformResourceLocator $locator */
        $locator = $container['locator'];
 
        $combine = $combine && $name !== 'default';
 
        // Merge current configuration with the default.
        $uris = $combine ? ["gantry-config://{$name}", 'gantry-config://default'] : ["gantry-config://{$name}"];
 
        $paths = [];
        foreach ($uris as $uri) {
            $paths = array_merge($paths, $locator->findResources($uri));
        }
 
        // Locate all configuration files to be compiled.
        $files = (new ConfigFileFinder)->locateFiles($paths);
 
 */
 
namespace Gantry\Framework\Services;
 
use Gantry\Component\Config\CompiledBlueprints;
use Gantry\Component\Config\CompiledConfig;
use Gantry\Component\Config\ConfigFileFinder;
use Gantry\Framework\Atoms;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use RocketTheme\Toolbox\ResourceLocator\UniformResourceLocator;
 
class ConfigServiceProvider implements ServiceProviderInterface
{
    public function register(Container $gantry)
    {
        $gantry['blueprints'] = function($c) {
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('blueprints', 'Loading blueprints');
 
            $blueprints = static::blueprints($c);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('blueprints');
 
            return $blueprints;
        };
 
        $gantry['config'] = function($c) {
            // Make sure configuration has been set.
            if (!isset($c['configuration'])) {
                throw new \LogicException('Gantry: Please set current configuration before using $gantry["config"]', 500);
            }
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('config', 'Loading configuration');
 
            // Get the current configuration and lock the value from modification.
            $outline = $c->lock('configuration');
 
            $config = static::load($c, $outline);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::setConfig($config)->stopTimer('config');
    {
        if (!isset($this->keys[$id])) {
            throw new UnknownIdentifierException($id);
        }
 
        if (
            isset($this->raw[$id])
            || !is_object($this->values[$id])
            || isset($this->protected[$this->values[$id]])
            || !method_exists($this->values[$id], '__invoke')
        ) {
            return $this->values[$id];
        }
 
        if (isset($this->factories[$this->values[$id]])) {
            return $this->values[$id]($this);
        }
 
        $raw = $this->values[$id];
        $val = $this->values[$id] = $raw($this);
        $this->raw[$id] = $raw;
 
        $this->frozen[$id] = true;
 
        return $val;
    }
 
    /**
     * Checks if a parameter or an object is set.
     *
     * @param string $id The unique identifier for the parameter or object
     *
     * @return bool
     */
    public function offsetExists($id)
    {
        return isset($this->keys[$id]);
    }
 
    /**
        // Merge current configuration with the default.
        $uris = $combine ? ["gantry-config://{$name}", 'gantry-config://default'] : ["gantry-config://{$name}"];
 
        $paths = [];
        foreach ($uris as $uri) {
            $paths = array_merge($paths, $locator->findResources($uri));
        }
 
        // Locate all configuration files to be compiled.
        $files = (new ConfigFileFinder)->locateFiles($paths);
 
        $cache = $locator->findResource('gantry-cache://theme/compiled/config', true, true);
 
        if (!$cache) {
            throw new \RuntimeException('Who just removed Gantry 5 cache folder? Try reloading the page if it fixes the issue');
        }
 
        $compiled = new CompiledConfig($cache, $files, GANTRY5_ROOT);
        $compiled->setBlueprints(function() use ($container) {
            return $container['blueprints'];
        });
 
        $config = $compiled->load($withDefaults);
 
        // Set atom inheritance.
        $atoms = $config->get('page.head.atoms');
        if (is_array($atoms)) {
            $config->set('page.head.atoms', (new Atoms($atoms))->init()->toArray());
        }
 
        return $config;
    }
}
 
            }
        }
 
        return $list;
    }
 
    /**
     * Return blueprint.
     *
     * @return BlueprintSchema|BlueprintForm
     * @since 5.4.7
     */
    public function blueprint()
    {
        if (!$this->blueprint){
            $this->blueprint = new BlueprintSchema;
        } elseif (is_callable($this->blueprint)) {
            // Lazy load blueprints.
            $blueprint = $this->blueprint;
            $this->blueprint = $blueprint();
        }
        return $this->blueprint;
    }
 
    /**
     * Return blueprints.
     *
     * @return BlueprintSchema
     * @deprecated 5.4.7
     */
    public function blueprints()
    {
        return $this->blueprint();
    }
 
    /**
     * Count items in nested array.
     *
     * @param string $path
     * @param string $separator
    {
        if (is_object($value)) {
            $value = (array) $value;
        } elseif (!is_array($value)) {
            throw new \RuntimeException("Value is not array in '{$name}': " . print_r($value, true));
        }
 
        $old = $this->get($name, null, $separator);
 
        if ($old === null) {
            // No value set; no need to join data.
            return $value;
        }
 
        if (!is_array($old)) {
            throw new \RuntimeException("Value is not array in '{$name}': " . print_r($value, true));
        }
 
        // Return joined data.
        return $this->blueprint()->mergeData($old, $value, $name, $separator);
    }
 
    /**
     * Merge two configurations together.
     *
     * @param array $data
     * @return $this
     */
    public function merge(array $data)
    {
        $this->items = $this->blueprint()->mergeData($this->items, $data);
 
        return $this;
    }
 
    /**
     * Set default values to the configuration if variables were not set.
     *
     * @param array $data
     * @return $this
    public function getContent($item, $options = [])
    {
        if (is_array($item)) {
            $item = (object) $item;
        }
 
        $gantry = static::gantry();
 
        /** @var Config $global */
        $global = $gantry['global'];
 
        $production = (bool) $global->get('production');
        $subtype = $item->subtype;
        $enabled = $gantry['config']->get("particles.{$subtype}.enabled", 1);
 
        if (!$enabled) {
            return new HtmlBlock;
        }
 
        $particle = $gantry['config']->getJoined("particles.{$subtype}", $item->attributes);
 
        $cached = false;
        $cacheKey = [];
 
        // Enable particle caching only in production mode.
        if ($production && isset($particle['caching'])) {
            $caching = $particle['caching'] + ['type' => 'dynamic'];
 
            switch ($caching['type']) {
                case 'static':
                    $cached = true;
                    break;
                case 'config_matches':
                    if (isset($particle['caching']['values'])) {
                        $values = (array) $particle['caching']['values'];
                        $compare = array_intersect_key($particle, $values);
                        $cached = ($values === $compare);
                    }
                    break;
                case 'menu':
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('atoms', "Preparing atoms");
 
            $gantry = static::gantry();
 
            /** @var Config $config */
            $config = $gantry['config'];
 
            /** @var \Gantry\Framework\Document $document */
            $document = $gantry['document'];
 
            $atoms = (array) $config->get('page.head.atoms');
 
            foreach ($atoms as $data) {
                $atom = [
                    'type' => 'atom',
                    'subtype' => $data['type'],
                ] + $data;
 
                try {
                    $block = $this->getContent($atom);
                    $document->addBlock($block);
 
                } catch (\Exception $e) {
                    if ($gantry->debug()) {
                        throw new \RuntimeException("Rendering Atom '{$atom['subtype']}' failed on error: {$e->getMessage()}", 500, $e);
                    }
                }
            }
 
            $assets = (array) $config->get('page.assets');
 
            if ($assets) {
                $atom = [
                    'id' => 'page-assets',
                    'title' => 'Page Assets',
                    'type' => 'atom',
                    'subtype' => 'assets',
                    'attributes' => $assets + ['enabled' => 1]
                ];
 
            if ($ignoreStrictCheck || !$this->env->isStrictVariables()) {
                return;
            }
 
            throw new Twig_Error_Runtime(sprintf('Neither the property "%1$s" nor one of the methods "%1$s()", "get%1$s()"/"is%1$s()" or "__call()" exist and have public access in class "%2$s".', $item, $class), -1, $this->getSourceContext());
        }
 
        if ($isDefinedTest) {
            return true;
        }
 
        if ($this->env->hasExtension('Twig_Extension_Sandbox')) {
            $this->env->getExtension('Twig_Extension_Sandbox')->checkMethodAllowed($object, $method);
        }
 
        // Some objects throw exceptions when they have __call, and the method we try
        // to call is not supported. If ignoreStrictCheck is true, we should return null.
        try {
            if (!$arguments) {
                $ret = $object->$method();
            } else {
                $ret = call_user_func_array(array($object, $method), $arguments);
            }
        } catch (BadMethodCallException $e) {
            if ($call && ($ignoreStrictCheck || !$this->env->isStrictVariables())) {
                return;
            }
            throw $e;
        }
 
        // @deprecated in 1.28
        if ($object instanceof Twig_TemplateInterface) {
            $self = $object->getTemplateName() === $this->getTemplateName();
            $message = sprintf('Calling "%s" on template "%s" from template "%s" is deprecated since version 1.28 and won\'t be supported anymore in 2.0.', $item, $object->getTemplateName(), $this->getTemplateName());
            if ('renderBlock' === $method || 'displayBlock' === $method) {
                $message .= sprintf(' Use block("%s"%s) instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('hasBlock' === $method) {
                $message .= sprintf(' Use "block("%s"%s) is defined" instead).', $arguments[0], $self ? '' : ', template');
            } elseif ('render' === $method || 'display' === $method) {
                $message .= sprintf(' Use include("%s") instead).', $object->getTemplateName());
 
        $this->blocks = array(
            'head_stylesheets' => array($this, 'block_head_stylesheets'),
            'head_platform' => array($this, 'block_head_platform'),
            'head_overrides' => array($this, 'block_head_overrides'),
            'head_meta' => array($this, 'block_head_meta'),
            'head_title' => array($this, 'block_head_title'),
            'head_application' => array($this, 'block_head_application'),
            'head_ie_stylesheets' => array($this, 'block_head_ie_stylesheets'),
            'head' => array($this, 'block_head'),
            'head_custom' => array($this, 'block_head_custom'),
        );
    }
 
    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "debugger", array()), "assets", array(), "method");
        // line 2
        $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "theme", array()), "loadAtoms", array(), "method");
        // line 4
        $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
        $assetVariables = array("priority" => 10);
        if ($assetVariables && !is_array($assetVariables)) {
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "head";
        if ($location && !is_string($location)) {
            throw new UnexpectedValueException('{% scripts in x %}: x is not a string');
        }
        $priority = isset($assetVariables['priority']) ? $assetVariables['priority'] : 0;
        ob_start();
        // line 5
        echo "    ";
        $this->displayBlock('head_stylesheets', $context, $blocks);
        // line 13
        $this->displayBlock('head_platform', $context, $blocks);
        // line 14
        echo "
    ";
            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 = array())
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Twig_Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for Twig_Error_Loader exceptions
            // see Twig_Error_Loader
            if (false === $e->getTemplateLine()) {
                $e->setTemplateLine(-1);
                $e->guess();
            }
 
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
        }
    }
 
    /**
     * Auto-generated method to display the template with the given context.
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     *
     * @internal
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = array())
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        ob_start();
        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;
        parent::__construct($env);
 
        // line 1
        $this->parent = $this->loadTemplate("@nucleus/page_head.html.twig", "partials/page_head.html.twig", 1);
        $this->blocks = array(
            'head_title' => array($this, 'block_head_title'),
            'head_application' => array($this, 'block_head_application'),
            'head_platform' => array($this, 'block_head_platform'),
            'head' => array($this, 'block_head'),
        );
    }
 
    protected function doGetParent(array $context)
    {
        return "@nucleus/page_head.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_head_title($context, array $blocks = array())
    {
        // line 4
        echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["site"] ?? null), "charset", array()), "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", array()), "html", null, true);
        echo "\" />";
    }
 
    // line 9
    public function block_head_application($context, array $blocks = array())
    {
        // 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 = array())
    {
        try {
            $this->doDisplay($context, $blocks);
        } catch (Twig_Error $e) {
            if (!$e->getSourceContext()) {
                $e->setSourceContext($this->getSourceContext());
            }
 
            // this is mostly useful for Twig_Error_Loader exceptions
            // see Twig_Error_Loader
            if (false === $e->getTemplateLine()) {
                $e->setTemplateLine(-1);
                $e->guess();
            }
 
            throw $e;
        } catch (Exception $e) {
            throw new Twig_Error_Runtime(sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
        }
    }
 
    /**
     * Auto-generated method to display the template with the given context.
    }
 
    /**
     * Returns all blocks.
     *
     * This method is for internal use only and should never be called
     * directly.
     *
     * @return array An array of blocks
     *
     * @internal
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = array())
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        ob_start();
        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 array An array of blocks
     *
     * @internal
     */
    public function getBlocks()
    {
        return $this->blocks;
    }
 
    public function display(array $context, array $blocks = array())
    {
        $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
    }
 
    public function render(array $context)
    {
        $level = ob_get_level();
        ob_start();
        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 = array())
    {
        try {
        @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 $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @return string The rendered template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function render($name, array $context = array())
    {
        return $this->loadTemplate($name)->render($context);
    }
 
    /**
     * Displays a template.
     *
     * @param string $name    The template name
     * @param array  $context An array of parameters to pass to the template
     *
     * @throws Twig_Error_Loader  When the template cannot be found
     * @throws Twig_Error_Syntax  When an error occurred during compilation
     * @throws Twig_Error_Runtime When an error occurred during rendering
     */
    public function display($name, array $context = array())
    {
        $this->loadTemplate($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) {
            \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();
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site will use a
 * different template.
 *
 * To generate specific templates for your pages you can use:
 * /mytheme/views/page-mypage.html.twig
 * (which will still route through this PHP file)
 * OR
 * /mytheme/page-mypage.php
 * (in which case you'll want to duplicate this file and save to the above path)
 */
 
$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);
 
$post            = Timber::query_post();
$context['post'] = $post;
 
Timber::render(['page-' . $post->post_name . '.html.twig', 'page.html.twig'], $context);
 
    elseif ( is_single()         && $template = get_single_template()         ) :
    elseif ( is_page()           && $template = get_page_template()           ) :
    elseif ( is_singular()       && $template = get_singular_template()       ) :
    elseif ( is_category()       && $template = get_category_template()       ) :
    elseif ( is_tag()            && $template = get_tag_template()            ) :
    elseif ( is_author()         && $template = get_author_template()         ) :
    elseif ( is_date()           && $template = get_date_template()           ) :
    elseif ( is_archive()        && $template = get_archive_template()        ) :
    else :
        $template = get_index_template();
    endif;
    /**
     * Filters the path of the current template before including it.
     *
     * @since 3.0.0
     *
     * @param string $template The path of the template to include.
     */
    if ( $template = apply_filters( 'template_include', $template ) ) {
        include( $template );
    } elseif ( current_user_can( 'switch_themes' ) ) {
        $theme = wp_get_theme();
        if ( $theme->errors() ) {
            wp_die( $theme->errors() );
        }
    }
    return;
endif;
 
<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */
 
if ( !isset($wp_did_header) ) {
 
    $wp_did_header = true;
 
    // Load the WordPress library.
    require_once( dirname(__FILE__) . '/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( dirname( __FILE__ ) . '/wp-blog-header.php' );
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /automatisme/
USER michelelaz
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /automatisme/
REMOTE_PORT 27480
SCRIPT_FILENAME /home/michelelaz/www/index.php
SERVER_ADMIN postmaster@www.michel-electricite.fr
DOCUMENT_ROOT /home/michelelaz/www
REMOTE_ADDR 3.231.226.13
SERVER_PORT 80
SERVER_ADDR 5.135.131.221
SERVER_NAME www.michel-electricite.fr
SERVER_SIGNATURE
HTTP_REMOTE_IP 3.231.226.13
HTTP_FORWARDED for=51.255.75.173; proto=http; host=www.michel-electricite.fr
HTTP_X_REMOTE_PROTO http
HTTP_X_REMOTE_IP 51.255.75.173
HTTP_X_REMOTE_PORT 55678
HTTP_X_FORWARDED_PROTO http
HTTP_X_FORWARDED_PORT 80
HTTP_REMOTE_PORT 52286
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Mon, 30 Mar 2020 06:04:12 CEST
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_FORWARDED_FOR 3.231.226.13
HTTP_X_PREDICTOR 1
HTTP_HOST www.michel-electricite.fr
ENVIRONMENT production
CFG_CLUSTER cluster023
SCRIPT_URI http://www.michel-electricite.fr/automatisme/
SCRIPT_URL /automatisme/
GEOIP_LONGITUDE -77.472801
GEOIP_LATITUDE 39.048100
GEOIP_AREA_CODE 703
GEOIP_DMA_CODE 511
GEOIP_CITY Ashburn
GEOIP_REGION VA
GEOIP_COUNTRY_NAME United States
GEOIP_COUNTRY_CODE US
UNIQUE_ID XtJwKLpN67EfK66gI4s-IAAAAEE
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1590849576.9409
REQUEST_TIME 1590849576
argv Array ( )
argc 0
Key Value
USER michelelaz
SCRIPT_NAME /index.php
REQUEST_URI /automatisme/
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.1
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /automatisme/
REMOTE_PORT 27480
SCRIPT_FILENAME /home/michelelaz/www/index.php
SERVER_ADMIN postmaster@www.michel-electricite.fr
DOCUMENT_ROOT /home/michelelaz/www
REMOTE_ADDR 3.231.226.13
SERVER_PORT 80
SERVER_ADDR 5.135.131.221
SERVER_NAME www.michel-electricite.fr
SERVER_SOFTWARE Apache
SERVER_SIGNATURE
HTTP_REMOTE_IP 3.231.226.13
HTTP_FORWARDED for=51.255.75.173; proto=http; host=www.michel-electricite.fr
HTTP_X_REMOTE_PROTO http
HTTP_X_REMOTE_IP 51.255.75.173
HTTP_X_REMOTE_PORT 55678
HTTP_X_FORWARDED_PROTO http
HTTP_X_FORWARDED_PORT 80
HTTP_REMOTE_PORT 52286
HTTP_ACCEPT_ENCODING br,gzip
HTTP_IF_MODIFIED_SINCE Mon, 30 Mar 2020 06:04:12 CEST
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT CCBot/2.0 (https://commoncrawl.org/faq/)
HTTP_X_FORWARDED_FOR 3.231.226.13
HTTP_X_PREDICTOR 1
HTTP_HOST www.michel-electricite.fr
ENVIRONMENT production
CFG_CLUSTER cluster023
SCRIPT_URI http://www.michel-electricite.fr/automatisme/
SCRIPT_URL /automatisme/
GEOIP_LONGITUDE -77.472801
GEOIP_LATITUDE 39.048100
GEOIP_AREA_CODE 703
GEOIP_DMA_CODE 511
GEOIP_CITY Ashburn
GEOIP_REGION VA
GEOIP_COUNTRY_NAME United States
GEOIP_COUNTRY_CODE US
UNIQUE_ID XtJwKLpN67EfK66gI4s-IAAAAEE
REDIRECT_STATUS 200
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1590849576.9409
REQUEST_TIME 1590849576
argv Array ( )
argc 0
0. Whoops\Handler\PrettyPageHandler