Error
Object of class WP_Error could not be converted to string Error thrown with message "Object of class WP_Error could not be converted to string" Stacktrace: #53 Error in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/94/949ce4f71a0527056738782ae36fa03420c01e9ebe5ffbdacb0542dbfab76395.php:160 #52 __TwigTemplate_7e698cb64677c23aa98b0ace0e3c62558b808b7a09e7a8181e2a00ee1af46768:doDisplay in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #51 Twig\Template:displayWithErrorHandling in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #50 Twig\Template:display in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/27/277bf83ee3dc5110377349616cd197d409e506665d7b0998b87c4881c683c058.php:316 #49 __TwigTemplate_dc23cf61256a06a593a22be5e84b7d318dc695c6c6156c6f04410bfe4d99d6c9:block_particle in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:216 #48 Twig\Template:displayBlock in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/ae/ae228ae27d24bf3dcf3957275113033b353178b192fbda239e9f569462407fea.php:73 #47 __TwigTemplate_54eb2dc0276f4c09a3aeeb1b587dc2c709dfa2610fd8667a1ba0d83300401abe:doDisplay in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #46 Twig\Template:displayWithErrorHandling in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #45 Twig\Template:display in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/27/277bf83ee3dc5110377349616cd197d409e506665d7b0998b87c4881c683c058.php:36 #44 __TwigTemplate_dc23cf61256a06a593a22be5e84b7d318dc695c6c6156c6f04410bfe4d99d6c9:doDisplay in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #43 Twig\Template:displayWithErrorHandling in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #42 Twig\Template:display in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/7d/7d8c37bb0fea9be9e82cf56e2a97a43b164bf41ab25e4b7250a70ac328f1de16.php:71 #41 __TwigTemplate_56cfa5fa5c99cb5b09d1d42dd3d1d6a72fd9f965df009314b5b6d98dab5adc70:doDisplay in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #40 Twig\Template:displayWithErrorHandling in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #39 Twig\Template:display in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #38 Twig\Template:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #37 Twig\TemplateWrapper:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Environment.php:384 #36 Twig\Environment:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #35 Gantry\Framework\Theme:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:769 #34 Gantry\Framework\Theme:getContent in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:668 #33 Gantry\Framework\Theme:renderContent in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:595 #32 Gantry\Framework\Theme:prepareLayout in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:581 #31 Gantry\Framework\Theme:prepareLayout in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:581 #30 Gantry\Framework\Theme:prepareLayout in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:581 #29 Gantry\Framework\Theme:prepareLayout in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:424 #28 Gantry\Framework\Theme:segments in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Component/Theme/ThemeTrait.php:437 #27 Gantry\Framework\Theme:prepare in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:90 #26 Gantry\Framework\Theme:prepare_particles in /home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php:287 #25 WP_Hook:apply_filters in /home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php:311 #24 WP_Hook:do_action in /home/cspmgr5/public_html/bethechange.coop/wp-includes/plugin.php:484 #23 do_action in /home/cspmgr5/public_html/bethechange.coop/wp-includes/script-loader.php:2004 #22 wp_enqueue_scripts in /home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php:287 #21 WP_Hook:apply_filters in /home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php:311 #20 WP_Hook:do_action in /home/cspmgr5/public_html/bethechange.coop/wp-includes/plugin.php:484 #19 do_action in /home/cspmgr5/public_html/bethechange.coop/wp-includes/general-template.php:3005 #18 wp_head in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/FunctionWrapper.php:97 #17 call_user_func_array in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/FunctionWrapper.php:97 #16 Timber\FunctionWrapper:call in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/timber/timber/lib/FunctionWrapper.php:23 #15 Timber\FunctionWrapper:__toString in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/b2/b2cdd38c8d207739dd43b6b41f05e78320e8f625ca6c3ac5163dfc3b0034a5e4.php:59 #14 __TwigTemplate_47a88fc741cd230862581223d2cab75d13c82c8dc707fb8db0186b354e1f13b8:block_head_application in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:216 #13 Twig\Template:displayBlock in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/9f/9fd8e49f9b95572172c9789cbc8b77f52d4163e0f49164c967af57689d2f5f4f.php:82 #12 __TwigTemplate_fa5ffeb30d83793798a316f1fdd6ec7b0de7f1dfb302c243792e4fb980361a8f:doDisplay in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #11 Twig\Template:displayWithErrorHandling in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #10 Twig\Template:display in /home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/b2/b2cdd38c8d207739dd43b6b41f05e78320e8f625ca6c3ac5163dfc3b0034a5e4.php:38 #9 __TwigTemplate_47a88fc741cd230862581223d2cab75d13c82c8dc707fb8db0186b354e1f13b8:doDisplay in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:455 #8 Twig\Template:displayWithErrorHandling in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:422 #7 Twig\Template:display in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Template.php:434 #6 Twig\Template:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/TemplateWrapper.php:47 #5 Twig\TemplateWrapper:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/vendor/twig/twig/src/Environment.php:384 #4 Twig\Environment:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/plugins/gantry5/src/classes/Gantry/Framework/Theme.php:141 #3 Gantry\Framework\Theme:render in /home/cspmgr5/public_html/bethechange.coop/wp-content/themes/rt_manticore/page.php:34 #2 include in /home/cspmgr5/public_html/bethechange.coop/wp-includes/template-loader.php:106 #1 require_once in /home/cspmgr5/public_html/bethechange.coop/wp-blog-header.php:19 #0 require in /home/cspmgr5/public_html/bethechange.coop/index.php:17
Stack frames (54)
53
Error
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/94/949ce4f71a0527056738782ae36fa03420c01e9ebe5ffbdacb0542dbfab76395.php160
52
__TwigTemplate_7e698cb64677c23aa98b0ace0e3c62558b808b7a09e7a8181e2a00ee1af46768 doDisplay
/vendor/twig/twig/src/Template.php455
51
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
50
Twig\Template display
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/27/277bf83ee3dc5110377349616cd197d409e506665d7b0998b87c4881c683c058.php316
49
__TwigTemplate_dc23cf61256a06a593a22be5e84b7d318dc695c6c6156c6f04410bfe4d99d6c9 block_particle
/vendor/twig/twig/src/Template.php216
48
Twig\Template displayBlock
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/ae/ae228ae27d24bf3dcf3957275113033b353178b192fbda239e9f569462407fea.php73
47
__TwigTemplate_54eb2dc0276f4c09a3aeeb1b587dc2c709dfa2610fd8667a1ba0d83300401abe doDisplay
/vendor/twig/twig/src/Template.php455
46
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
45
Twig\Template display
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/27/277bf83ee3dc5110377349616cd197d409e506665d7b0998b87c4881c683c058.php36
44
__TwigTemplate_dc23cf61256a06a593a22be5e84b7d318dc695c6c6156c6f04410bfe4d99d6c9 doDisplay
/vendor/twig/twig/src/Template.php455
43
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
42
Twig\Template display
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/7d/7d8c37bb0fea9be9e82cf56e2a97a43b164bf41ab25e4b7250a70ac328f1de16.php71
41
__TwigTemplate_56cfa5fa5c99cb5b09d1d42dd3d1d6a72fd9f965df009314b5b6d98dab5adc70 doDisplay
/vendor/twig/twig/src/Template.php455
40
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
39
Twig\Template display
/vendor/twig/twig/src/Template.php434
38
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php47
37
Twig\TemplateWrapper render
/vendor/twig/twig/src/Environment.php384
36
Twig\Environment render
/classes/Gantry/Framework/Theme.php141
35
Gantry\Framework\Theme render
/classes/Gantry/Component/Theme/ThemeTrait.php769
34
Gantry\Framework\Theme getContent
/classes/Gantry/Component/Theme/ThemeTrait.php668
33
Gantry\Framework\Theme renderContent
/classes/Gantry/Component/Theme/ThemeTrait.php595
32
Gantry\Framework\Theme prepareLayout
/classes/Gantry/Component/Theme/ThemeTrait.php581
31
Gantry\Framework\Theme prepareLayout
/classes/Gantry/Component/Theme/ThemeTrait.php581
30
Gantry\Framework\Theme prepareLayout
/classes/Gantry/Component/Theme/ThemeTrait.php581
29
Gantry\Framework\Theme prepareLayout
/classes/Gantry/Component/Theme/ThemeTrait.php424
28
Gantry\Framework\Theme segments
/classes/Gantry/Component/Theme/ThemeTrait.php437
27
Gantry\Framework\Theme prepare
/classes/Gantry/Framework/Theme.php90
26
Gantry\Framework\Theme prepare_particles
/home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php287
25
WP_Hook apply_filters
/home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php311
24
WP_Hook do_action
/home/cspmgr5/public_html/bethechange.coop/wp-includes/plugin.php484
23
do_action
/home/cspmgr5/public_html/bethechange.coop/wp-includes/script-loader.php2004
22
wp_enqueue_scripts
/home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php287
21
WP_Hook apply_filters
/home/cspmgr5/public_html/bethechange.coop/wp-includes/class-wp-hook.php311
20
WP_Hook do_action
/home/cspmgr5/public_html/bethechange.coop/wp-includes/plugin.php484
19
do_action
/home/cspmgr5/public_html/bethechange.coop/wp-includes/general-template.php3005
18
wp_head
/vendor/timber/timber/lib/FunctionWrapper.php97
17
call_user_func_array
/vendor/timber/timber/lib/FunctionWrapper.php97
16
Timber\FunctionWrapper call
/vendor/timber/timber/lib/FunctionWrapper.php23
15
Timber\FunctionWrapper __toString
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/b2/b2cdd38c8d207739dd43b6b41f05e78320e8f625ca6c3ac5163dfc3b0034a5e4.php59
14
__TwigTemplate_47a88fc741cd230862581223d2cab75d13c82c8dc707fb8db0186b354e1f13b8 block_head_application
/vendor/twig/twig/src/Template.php216
13
Twig\Template displayBlock
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/9f/9fd8e49f9b95572172c9789cbc8b77f52d4163e0f49164c967af57689d2f5f4f.php82
12
__TwigTemplate_fa5ffeb30d83793798a316f1fdd6ec7b0de7f1dfb302c243792e4fb980361a8f doDisplay
/vendor/twig/twig/src/Template.php455
11
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
10
Twig\Template display
/home/cspmgr5/public_html/bethechange.coop/wp-content/cache/gantry5/rt_manticore/twig/b2/b2cdd38c8d207739dd43b6b41f05e78320e8f625ca6c3ac5163dfc3b0034a5e4.php38
9
__TwigTemplate_47a88fc741cd230862581223d2cab75d13c82c8dc707fb8db0186b354e1f13b8 doDisplay
/vendor/twig/twig/src/Template.php455
8
Twig\Template displayWithErrorHandling
/vendor/twig/twig/src/Template.php422
7
Twig\Template display
/vendor/twig/twig/src/Template.php434
6
Twig\Template render
/vendor/twig/twig/src/TemplateWrapper.php47
5
Twig\TemplateWrapper render
/vendor/twig/twig/src/Environment.php384
4
Twig\Environment render
/classes/Gantry/Framework/Theme.php141
3
Gantry\Framework\Theme render
/home/cspmgr5/public_html/bethechange.coop/wp-content/themes/rt_manticore/page.php34
2
include
/home/cspmgr5/public_html/bethechange.coop/wp-includes/template-loader.php106
1
require_once
/home/cspmgr5/public_html/bethechange.coop/wp-blog-header.php19
0
require
/home/cspmgr5/public_html/bethechange.coop/index.php17
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["_key"] => $context["item"]) {
            // line 53
            echo "                <div class=\"g-latestnews-nav-item ";
            if (($this->getAttribute(($context["particle"] ?? null), "selected", []) == "first")) {
                if ($this->getAttribute($context["loop"], "first", [])) {
                    echo "selected";
                }
            }
            echo "\" data-group=\"";
            echo twig_escape_filter($this->env, $context["item"], "html", null, true);
            echo "\">
                    ";
            // line 54
            echo twig_escape_filter($this->env, $this->getAttribute(($context["wordpress"] ?? null), "call", [0 => "get_the_category_by_ID", 1 => $context["item"]], "method"), "html", null, true);
            echo "
                </div>
            ";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['item'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 57
        echo "        </div>
    </div>
</div>
 
            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) {
                    $context['loop']['last'] = 0 === $context['loop']['revindex0'];
                }
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['case'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 85
            echo "            </div>
        ";
        } else {
            // line 87
            echo "            ";
            $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 = null;
            try {
                $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4 =                 $this->loadTemplate((("@particles/latestnews-" . $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "platform", []), "name", [])) . ".html.twig"), "@particles/latestnews.html.twig", 87);
            } catch (LoaderError $e) {
                // ignore missing template
            }
            if ($__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4) {
                $__internal_f607aeef2c31a95a7bf963452dff024ffaeb6aafbe4603f9ca3bec57be8633f4->display($context);
            }
            // line 88
            echo "        ";
        }
        // line 89
        echo "    </div>
";
    }
 
    // line 91
    public function block_javascript_footer($context, array $blocks = [])
    {
        // line 92
        echo "    ";
        $this->getAttribute(($context["gantry"] ?? null), "load", [0 => "jquery"], "method");
        // line 93
        echo "    <script src=\"";
        echo twig_escape_filter($this->env, $this->env->getExtension('Gantry\Component\Twig\TwigExtension')->urlFunc("//cdn.polyfill.io/v2/polyfill.min.js?features=default,fetch,Array.prototype.includes"), "html", null, true);
        echo "\"></script>
    <script src=\"";
 
        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);
        $assetFunction($content, $location, $priority);
        // line 9
        $assetFunction = $this->env->getFunction('parse_assets')->getCallable();
        $assetVariables = [];
        if ($assetVariables && !is_array($assetVariables)) {
            throw new UnexpectedValueException('{% scripts with x %}: x is not an array');
        }
        $location = "footer";
        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 10
        echo "    ";
        $this->displayBlock('javascript_footer', $context, $blocks);
        $content = ob_get_clean();
        $assetFunction($content, $location, $priority);
        // line 14
        $this->displayBlock('particle', $context, $blocks);
    }
 
    // line 2
    public function block_stylesheets($context, array $blocks = [])
    {
        // line 3
        echo "    ";
    }
 
    // line 5
    public function block_javascript($context, array $blocks = [])
    {
        // line 6
        echo "    ";
    }
 
    // line 10
    public function block_javascript_footer($context, array $blocks = [])
    {
        // line 11
            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 __construct(Environment $env)
    {
        parent::__construct($env);
 
        $this->blocks = [
            'particle' => [$this, 'block_particle'],
            'javascript_footer' => [$this, 'block_javascript_footer'],
        ];
    }
 
    protected function doGetParent(array $context)
    {
        // line 1
        return "@nucleus/partials/particle.html.twig";
    }
 
    protected function doDisplay(array $context, array $blocks = [])
    {
        $this->parent = $this->loadTemplate("@nucleus/partials/particle.html.twig", "@particles/latestnews.html.twig", 1);
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }
 
    // line 3
    public function block_particle($context, array $blocks = [])
    {
        // line 4
        echo "    <div class=\"";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "class", []));
        echo " g-latestnews\" data-latestnews-id=\"";
        echo twig_escape_filter($this->env, ($context["id"] ?? null), "html", null, true);
        echo "\" data-latestnews-accesstoken=\"";
        echo twig_escape_filter($this->env, $this->getAttribute(($context["particle"] ?? null), "accesstoken", []), "html", null, true);
        echo "\">
        ";
        // line 5
        if (( !$this->getAttribute(($context["particle"] ?? null), "source", []) || ($this->getAttribute(($context["particle"] ?? null), "source", []) == "particle"))) {
            // line 6
            echo "            <div class=\"g-latestnews-header\">
                ";
            // line 7
            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) {
                    echo "            ";
                    $context["particle"] = $this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "config", []), "getJoined", [0 => ("particles." . $this->getAttribute(($context["segment"] ?? null), "subtype", [])), 1 => $this->getAttribute(($context["segment"] ?? null), "attributes", [])], "method");
                    // line 10
                    echo "        ";
                }
                // line 11
                echo "    ";
            }
            // line 12
            echo "
    ";
            // line 13
            ob_start(function () { return ''; });
            // line 14
            echo "        ";
            if ((($context["enabled"] ?? null) && ((null === $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])) || $this->getAttribute($this->getAttribute(($context["segment"] ?? null), "attributes", []), "enabled", [])))) {
                // line 15
                echo "            ";
                $this->loadTemplate([0 => (("particles/" . $this->getAttribute(($context["segment"] ?? null), "subtype", [])) . ".html.twig"), 1 => (("@particles/" . $this->getAttribute(                // line 16
($context["segment"] ?? null), "subtype", [])) . ".html.twig"), 2 => "@nucleus/content/missing.html.twig"], "@nucleus/content/particle.html.twig", 15)->display($context);
                // line 18
                echo "        ";
            }
            // line 19
            echo "    ";
            $context["html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset());
            // line 20
            echo "    ";
            $context["html"] = twig_trim_filter(($context["html"] ?? null));
            // line 21
            echo "
    ";
            // line 22
            $context["classes"] = twig_trim_filter(((( !($context["inContent"] ?? null)) ? ("g-content g-particle ") : ("g-particle ")) . twig_join_filter($this->getAttribute(($context["segment"] ?? null), "classes", []), " ")));
            // line 23
            if (($context["html"] ?? null)) {
                // line 24
                if ($this->getAttribute(($context["gantry"] ?? null), "debug", [])) {
                    echo "<!-- START PARTICLE ";
                    echo twig_escape_filter($this->env, ($context["id"] ?? null), "html", null, true);
            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) {
            \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();
 
            $filename = $locator->findResource("gantry-cache://theme/html/{$key}.php", true, true);
            $file = PhpFile::instance($filename);
            if ($file->exists()) {
                try {
                    return ContentBlock::fromArray((array) $file->content());
                } catch (\Exception $e) {
                    // Invalid cache, continue to rendering.
                    GANTRY_DEBUGGER && \Gantry\Debugger::addMessage(sprintf('Failed to load %s %s cache', $item->type, $item->id), 'debug');
                }
            }
        }
 
        // Create new document context for assets.
        $context = $this->getContext(['segment' => $item, 'enabled' => 1, 'particle' => $particle] + $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document->push();
        $html = trim($this->render("@nucleus/content/{$item->type}.html.twig", $context));
        $content = $document->pop()->setContent($html);
 
        if (isset($file)) {
            // Save HTML and assets into the cache.
            GANTRY_DEBUGGER && \Gantry\Debugger::addMessage(sprintf('Caching %s %s', $item->type, $item->id), 'debug');
            $file->save($content->toArray());
        }
 
        return $content;
    }
}
 
                        }
                    }
            }
        }
    }
 
    /**
     * Renders individual content block, like particle or position.
     *
     * Function is used to pre-render content.
     *
     * @param object|array $item
     * @param array $options
     * @return string|null
     */
    public function renderContent($item, $options = [])
    {
        $gantry = static::gantry();
 
        $content = $this->getContent($item, $options);
 
        /** @var Document $document */
        $document = $gantry['document'];
        $document->addBlock($content);
 
        $html = $content->toString();
        return !strstr($html, '@@DEFERRED@@') ? $html : null;
    }
 
    /**
     * Renders individual content block, like particle or position.
     *
     * Function is used to pre-render content.
     *
     * @param object|array $item
     * @param array $options
     * @return ContentBlock
     * @since 5.4.3
     */
    public function getContent($item, $options = [])
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
 
                    break;
 
                default:
                    if ($sticky) {
                        $item->attributes->sticky = 1;
                        break;
                    }
 
                    if (empty($item->children)) {
                        unset($items[$i]);
                        break;
                    }
 
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
     * @param array $items
     * @param bool  $temporary
     * @param bool  $sticky
     * @internal
     */
    protected function prepareLayout(array &$items, $temporary = false, $sticky = false)
    {
        foreach ($items as $i => &$item) {
            // Non-numeric items are meta-data which should be ignored.
            if (((string)(int) $i !== (string) $i) || !is_object($item)) {
                continue;
            }
 
            if (!empty($item->children)) {
                $fixed = true;
                foreach ($item->children as $child) {
                    $fixed &= !empty($child->attributes->fixed);
                }
 
                $this->prepareLayout($item->children, $fixed, $temporary);
            }
 
            // TODO: remove hard coded types.
            switch ($item->type) {
                case 'system':
                    break;
 
                case 'atom':
                case 'particle':
                case 'position':
                case 'spacer':
                    GANTRY_DEBUGGER && \Gantry\Debugger::startTimer($item->id, "Rendering {$item->id}");
 
                    $item->content = $this->renderContent($item, ['prepare_layout' => true]);
                    // Note that content can also be null (postpone rendering).
                    if ($item->content === '') {
                        unset($items[$i]);
                    }
 
                    GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer($item->id);
                }
            }
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('atoms');
        }
    }
 
    /**
     * Returns all non-empty segments from the layout.
     *
     * @return array
     */
    public function segments()
    {
        if (!isset($this->segments)) {
            $this->segments = $this->loadLayout()->toArray();
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('segments', "Preparing layout");
 
            $this->prepareLayout($this->segments);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('segments');
        }
 
        return $this->segments;
    }
 
    /**
     * Prepare layout for rendering. Initializes all CSS/JS in particles.
     */
    public function prepare()
    {
        $this->segments();
    }
 
    /**
     * Returns details of the theme.
     *
     * @return ThemeDetails
     */
    {
        if (!isset($this->segments)) {
            $this->segments = $this->loadLayout()->toArray();
 
            GANTRY_DEBUGGER && \Gantry\Debugger::startTimer('segments', "Preparing layout");
 
            $this->prepareLayout($this->segments);
 
            GANTRY_DEBUGGER && \Gantry\Debugger::stopTimer('segments');
        }
 
        return $this->segments;
    }
 
    /**
     * Prepare layout for rendering. Initializes all CSS/JS in particles.
     */
    public function prepare()
    {
        $this->segments();
    }
 
    /**
     * Returns details of the theme.
     *
     * @return ThemeDetails
     */
    public function details()
    {
        if (!$this->details) {
            $this->details = new ThemeDetails($this->name);
        }
        return $this->details;
    }
 
    /**
     * Returns configuration of the theme.
     *
     * @return array
     */
     * @param \Twig_Environment $twig
     * @param \Twig_LoaderInterface $loader
     * @return \Twig_Environment
     */
    public function extendTwig(\Twig_Environment $twig, \Twig_LoaderInterface $loader = null)
    {
        parent::extendTwig($twig, $loader);
 
        // FIXME: Get timezone from WP.
        //$timezone = 'UTC';
        //$twig->getExtension('Twig_Extension_Core')->setTimezone(new \DateTimeZone($timezone));
 
        return $twig;
    }
 
    public function prepare_particles()
    {
        if(!is_admin()) {
            $gantry = Gantry::instance();
            $gantry['theme']->prepare();
        }
    }
 
    /**
     * 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) {
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 ] = array_keys( $this->callbacks );
 
        do {
            $priority = current( $this->iterations[ $nesting_level ] );
 
    if ( ! isset( $wp_filter[ $tag ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
        return;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $tag;
    }
 
    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[ $tag ]->do_action( $arg );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Retrieve the number of times an action is fired.
 *
 * @since 2.1.0
 *
 * @global int[] $wp_actions Stores the number of times each action was triggered.
 *
 * @param string $tag The name of the action hook.
 * @return int The number of times action hook $tag is fired.
 */
function did_action( $tag ) {
    global $wp_actions;
 
    if ( ! isset( $wp_actions[ $tag ] ) ) {
        return 0;
    }
     * @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 );
 
 
        $nesting_level = $this->nesting_level++;
 
        $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
        $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, (int) $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 ] = array_keys( $this->callbacks );
 
        do {
            $priority = current( $this->iterations[ $nesting_level ] );
 
    if ( ! isset( $wp_filter[ $tag ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
        return;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $tag;
    }
 
    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[ $tag ]->do_action( $arg );
 
    array_pop( $wp_current_filter );
}
 
/**
 * Retrieve the number of times an action is fired.
 *
 * @since 2.1.0
 *
 * @global int[] $wp_actions Stores the number of times each action was triggered.
 *
 * @param string $tag The name of the action hook.
 * @return int The number of times action hook $tag is fired.
 */
function did_action( $tag ) {
    global $wp_actions;
 
    if ( ! isset( $wp_actions[ $tag ] ) ) {
        return 0;
    }
     * @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 );
}
 
/**
 * Fire 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' );
}
 
/**
 * Fire 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' );
}
 
/**
 * Fire 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 24
        echo "<head>
    ";
        // line 25
        echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "head_top"], "method"), "
    ");
        echo "
    ";
        // line 26
        $this->displayBlock('head_meta', $context, $blocks);
        // line 52
        $this->displayBlock('head_title', $context, $blocks);
        // line 56
        echo "
    ";
        // line 57
        $this->displayBlock('head_application', $context, $blocks);
        // line 61
        echo "
    ";
        // line 62
        $this->displayBlock('head_ie_stylesheets', $context, $blocks);
        // line 70
        $this->displayBlock('head', $context, $blocks);
        // line 71
        echo "    ";
        $this->displayBlock('head_custom', $context, $blocks);
        // line 76
        echo "    ";
        echo twig_join_filter($this->getAttribute($this->getAttribute(($context["gantry"] ?? null), "document", []), "getHtml", [0 => "head_bottom"], "method"), "
    ");
        echo "
</head>
";
    }
 
    // line 5
            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) {
            \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);
 
            }
 
            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';
 

Environment & details:

empty
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE Apache
REQUEST_URI /projects/
USER cspmgr5
HOME /home/cspmgr5
SCRIPT_NAME /index.php
QUERY_STRING
REQUEST_METHOD GET
SERVER_PROTOCOL HTTP/1.0
GATEWAY_INTERFACE CGI/1.1
REDIRECT_URL /projects/
REMOTE_PORT 58430
SCRIPT_FILENAME /home/cspmgr5/public_html/bethechange.coop/index.php
SERVER_ADMIN webmaster@bethechange.cspmgroup.com
CONTEXT_DOCUMENT_ROOT /home/cspmgr5/public_html/bethechange.coop
CONTEXT_PREFIX
REQUEST_SCHEME https
DOCUMENT_ROOT /home/cspmgr5/public_html/bethechange.coop
REMOTE_ADDR 18.206.177.17
SERVER_PORT 443
SERVER_ADDR 199.250.194.141
SERVER_NAME bethechange.coop
SERVER_SIGNATURE
PATH /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin
HTTP_X_HTTPS 1
HTTP_ACCEPT_ENCODING br,gzip
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_CONNECTION close
HTTP_X_FORWARDED_PROTO https
HTTP_HOST bethechange.coop
HTTP_X_REAL_IP 18.206.177.17
proxy-nokeepalive 1
SSL_TLS_SNI bethechange.coop
HTTPS on
HTTP_AUTHORIZATION
SCRIPT_URI https://bethechange.coop/projects/
SCRIPT_URL /projects/
UNIQUE_ID YHtq7mulmUeIJWNqL8EoKwAAAko
REDIRECT_STATUS 200
REDIRECT_SSL_TLS_SNI bethechange.coop
REDIRECT_HTTPS on
REDIRECT_HTTP_AUTHORIZATION
REDIRECT_SCRIPT_URI https://bethechange.coop/projects/
REDIRECT_SCRIPT_URL /projects/
REDIRECT_UNIQUE_ID YHtq7mulmUeIJWNqL8EoKwAAAko
FCGI_ROLE RESPONDER
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1618701038.2291
REQUEST_TIME 1618701038
argv Array ( )
argc 0
empty
0. Whoops\Handler\PrettyPageHandler