TypeError
reset(): Argument #1 ($array) must be of type array, false given TypeError thrown with message "reset(): Argument #1 ($array) must be of type array, false given" Stacktrace: #40 TypeError in /home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/featured/publication.php:37 #39 reset in /home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/featured/publication.php:37 #38 require in /home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php:107 #37 Illuminate\Filesystem\Filesystem:{closure:Illuminate\Filesystem\Filesystem::getRequire():104} in /home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php:108 #36 Illuminate\Filesystem\Filesystem:getRequire in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php:58 #35 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php:38 #34 Illuminate\View\Engines\PhpEngine:get in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:139 #33 Illuminate\View\View:getContents in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:122 #32 Illuminate\View\View:renderContents in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:91 #31 Illuminate\View\View:render in /home/runcloud/webapps/canso-prod/vendor/wp-kit/utils/helpers.php:62 #30 view in /home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/loops/publication.php:3 #29 require in /home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php:107 #28 Illuminate\Filesystem\Filesystem:{closure:Illuminate\Filesystem\Filesystem::getRequire():104} in /home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php:108 #27 Illuminate\Filesystem\Filesystem:getRequire in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php:58 #26 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php:38 #25 Illuminate\View\Engines\PhpEngine:get in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:139 #24 Illuminate\View\View:getContents in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:122 #23 Illuminate\View\View:renderContents in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:91 #22 Illuminate\View\View:render in /home/runcloud/webapps/canso-prod/vendor/wp-kit/utils/helpers.php:62 #21 view in /home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/blocks/acf/archive-loop.php:11 #20 require in /home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php:107 #19 Illuminate\Filesystem\Filesystem:{closure:Illuminate\Filesystem\Filesystem::getRequire():104} in /home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php:108 #18 Illuminate\Filesystem\Filesystem:getRequire in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php:58 #17 Illuminate\View\Engines\PhpEngine:evaluatePath in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php:38 #16 Illuminate\View\Engines\PhpEngine:get in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:139 #15 Illuminate\View\View:getContents in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:122 #14 Illuminate\View\View:renderContents in /home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php:91 #13 Illuminate\View\View:render in /home/runcloud/webapps/canso-prod/vendor/wp-kit/utils/helpers.php:62 #12 view in /home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/controllers/AppController.php:362 #11 Theme\Controllers\AppController:renderBlock in /home/runcloud/webapps/canso-prod/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php:718 #10 acf_render_block in /home/runcloud/webapps/canso-prod/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php:620 #9 acf_rendered_block in /home/runcloud/webapps/canso-prod/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php:543 #8 acf_render_block_callback in /home/runcloud/webapps/canso-prod/web/wp/wp-includes/class-wp-block.php:586 #7 WP_Block:render in /home/runcloud/webapps/canso-prod/web/wp/wp-includes/blocks.php:2359 #6 render_block in /home/runcloud/webapps/canso-prod/web/wp/wp-includes/blocks.php:2431 #5 do_blocks in /home/runcloud/webapps/canso-prod/web/wp/wp-includes/class-wp-hook.php:324 #4 WP_Hook:apply_filters in /home/runcloud/webapps/canso-prod/web/wp/wp-includes/plugin.php:205 #3 apply_filters in /home/runcloud/webapps/canso-prod/web/app/themes/canso/index.php:21 #2 include in /home/runcloud/webapps/canso-prod/web/wp/wp-includes/template-loader.php:106 #1 require_once in /home/runcloud/webapps/canso-prod/web/wp/wp-blog-header.php:19 #0 require in /home/runcloud/webapps/canso-prod/web/index.php:5
Stack frames (41)
40
TypeError
/web/app/themes/canso/resources/views/archive/featured/publication.php37
39
reset
/web/app/themes/canso/resources/views/archive/featured/publication.php37
38
require
/vendor/illuminate/filesystem/Filesystem.php107
37
Illuminate\Filesystem\Filesystem {closure:Illuminate\Filesystem\Filesystem::getRequire():104}
/vendor/illuminate/filesystem/Filesystem.php108
36
Illuminate\Filesystem\Filesystem getRequire
/vendor/illuminate/view/Engines/PhpEngine.php58
35
Illuminate\View\Engines\PhpEngine evaluatePath
/vendor/illuminate/view/Engines/PhpEngine.php38
34
Illuminate\View\Engines\PhpEngine get
/vendor/illuminate/view/View.php139
33
Illuminate\View\View getContents
/vendor/illuminate/view/View.php122
32
Illuminate\View\View renderContents
/vendor/illuminate/view/View.php91
31
Illuminate\View\View render
/vendor/wp-kit/utils/helpers.php62
30
view
/web/app/themes/canso/resources/views/archive/loops/publication.php3
29
require
/vendor/illuminate/filesystem/Filesystem.php107
28
Illuminate\Filesystem\Filesystem {closure:Illuminate\Filesystem\Filesystem::getRequire():104}
/vendor/illuminate/filesystem/Filesystem.php108
27
Illuminate\Filesystem\Filesystem getRequire
/vendor/illuminate/view/Engines/PhpEngine.php58
26
Illuminate\View\Engines\PhpEngine evaluatePath
/vendor/illuminate/view/Engines/PhpEngine.php38
25
Illuminate\View\Engines\PhpEngine get
/vendor/illuminate/view/View.php139
24
Illuminate\View\View getContents
/vendor/illuminate/view/View.php122
23
Illuminate\View\View renderContents
/vendor/illuminate/view/View.php91
22
Illuminate\View\View render
/vendor/wp-kit/utils/helpers.php62
21
view
/web/app/themes/canso/resources/views/blocks/acf/archive-loop.php11
20
require
/vendor/illuminate/filesystem/Filesystem.php107
19
Illuminate\Filesystem\Filesystem {closure:Illuminate\Filesystem\Filesystem::getRequire():104}
/vendor/illuminate/filesystem/Filesystem.php108
18
Illuminate\Filesystem\Filesystem getRequire
/vendor/illuminate/view/Engines/PhpEngine.php58
17
Illuminate\View\Engines\PhpEngine evaluatePath
/vendor/illuminate/view/Engines/PhpEngine.php38
16
Illuminate\View\Engines\PhpEngine get
/vendor/illuminate/view/View.php139
15
Illuminate\View\View getContents
/vendor/illuminate/view/View.php122
14
Illuminate\View\View renderContents
/vendor/illuminate/view/View.php91
13
Illuminate\View\View render
/vendor/wp-kit/utils/helpers.php62
12
view
/web/app/themes/canso/resources/controllers/AppController.php362
11
Theme\Controllers\AppController renderBlock
/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php718
10
acf_render_block
/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php620
9
acf_rendered_block
/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php543
8
acf_render_block_callback
/web/wp/wp-includes/class-wp-block.php586
7
WP_Block render
/web/wp/wp-includes/blocks.php2359
6
render_block
/web/wp/wp-includes/blocks.php2431
5
do_blocks
/web/wp/wp-includes/class-wp-hook.php324
4
WP_Hook apply_filters
/web/wp/wp-includes/plugin.php205
3
apply_filters
/web/app/themes/canso/index.php21
2
include
/web/wp/wp-includes/template-loader.php106
1
require_once
/web/wp/wp-blog-header.php19
0
require
/web/index.php5
/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/featured/publication.php
  1. 'reports'
  2. ]
  3. )
  4. )
  5. ]));
  6. $publication = reset($publications);
  7. $GLOBALS['publication'] = $publication;
  8. ?>
  9. <?php if( $publication ) : ?>
  10. <div class="mg-b-2">
  11. <?php
  12. $programme = reset( get_the_terms( $publication, 'programme' ) );
  13. $region = reset( get_the_terms( $publication, 'region' ) );
  14. $tags = implode(', ', array_filter([$programme->name, $region->name]));
  15. echo view('app/card', [
  16. 'orientation' => isset( $orientation ) ? $orientation : 'left',
  17. 'title' => get_the_title($publication),
  18. 'link' => get_permalink($publication),
  19. 'image_id' => get_post_thumbnail_id($publication), // Featured, so use Featured Image not Publication Image
  20. 'button_text' => 'Read More',
  21. 'chevron' => false,
  22. 'image_size' => 'news-image',
  23. 'image_fit' => 'cover',
  24. 'excerpt' => apply_filters( 'short_excerpt', get_the_excerpt($publication), 25),
  25. 'popup' => apply_filters( 'short_excerpt', get_the_content(null, false, $publication), 50),
  26. 'popup_alt' => apply_filters( 'short_excerpt', get_the_excerpt($publication), 75),
  27. 'marker' => 'Featured Publication',
  28. 'tag' => $tags,
  29. 'tag_right' => true
  30. ]);
Arguments
  1. "reset(): Argument #1 ($array) must be of type array, false given"
    
/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/featured/publication.php
                    'reports'
                ]
            )
        )
    ]));
    
    $publication = reset($publications);
    
    $GLOBALS['publication'] = $publication;
    
?>
 
<?php if( $publication ) : ?>
 
    <div class="mg-b-2">
    
        <?php
            
            $programme = reset( get_the_terms( $publication, 'programme' ) );
            $region = reset( get_the_terms( $publication, 'region' ) );
            
            $tags = implode(', ', array_filter([$programme->name, $region->name]));
            
            echo view('app/card', [
                'orientation' => isset( $orientation ) ? $orientation : 'left',
                'title' => get_the_title($publication),
                'link' => get_permalink($publication),
                'image_id' => get_post_thumbnail_id($publication),    // Featured, so use Featured Image not Publication Image
                'button_text' => 'Read More',
                'chevron' => false,
                'image_size' => 'news-image',
                'image_fit' => 'cover',
                'excerpt' => apply_filters( 'short_excerpt', get_the_excerpt($publication), 25),
                'popup' => apply_filters( 'short_excerpt', get_the_content(null, false, $publication), 50),
                'popup_alt' => apply_filters( 'short_excerpt', get_the_excerpt($publication), 75),
                'marker' => 'Featured Publication',
                'tag' => $tags,
                'tag_right' => true
            ]); 
            
/home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php
 
    /**
     * Get the returned value of a file.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function getRequire($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
            return (static function () use ($__path, $__data) {
                extract($__data, EXTR_SKIP);
 
                return require $__path;
            })();
        }
 
        throw new FileNotFoundException("File does not exist at path {$path}.");
    }
 
    /**
     * Require the given file once.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function requireOnce($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
Arguments
  1. "/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/featured/publication.php"
    
/home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php
    /**
     * Get the returned value of a file.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function getRequire($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
            return (static function () use ($__path, $__data) {
                extract($__data, EXTR_SKIP);
 
                return require $__path;
            })();
        }
 
        throw new FileNotFoundException("File does not exist at path {$path}.");
    }
 
    /**
     * Require the given file once.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function requireOnce($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php
    }
 
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    protected function evaluatePath($path, $data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            $this->files->getRequire($path, $data);
        } catch (Throwable $e) {
            $this->handleViewException($e, $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Throwable  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Throwable
     */
    protected function handleViewException(Throwable $e, $obLevel)
    {
        while (ob_get_level() > $obLevel) {
            ob_end_clean();
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php
     * Create a new file engine instance.
     *
     * @param  \Illuminate\Filesystem\Filesystem  $files
     * @return void
     */
    public function __construct(Filesystem $files)
    {
        $this->files = $files;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    public function get($path, array $data = [])
    {
        return $this->evaluatePath($path, $data);
    }
 
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    protected function evaluatePath($path, $data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            $this->files->getRequire($path, $data);
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
     * Get the data bound to the view instance.
     *
     * @return array
     */
    public function gatherData()
    {
        $data = array_merge($this->factory->getShared(), $this->data);
 
        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            }
        }
 
        return $data;
    }
 
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
     */
    protected function renderContents()
    {
        // We will keep track of the amount of views being rendered so we can flush
        // the section after the complete rendering operation is done. This will
        // clear out the sections for any separate views that may be rendered.
        $this->factory->incrementRender();
 
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
        $this->view = $view;
        $this->path = $path;
        $this->engine = $engine;
        $this->factory = $factory;
 
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
 
    /**
     * Get the string contents of the view.
     *
     * @param  callable|null  $callback
     * @return array|string
     *
     * @throws \Throwable
     */
    public function render(callable $callback = null)
    {
        try {
            $contents = $this->renderContents();
 
            $response = isset($callback) ? $callback($this, $contents) : null;
 
            // Once we have the contents of the view, we will flush the sections if we are
            // done rendering all views so that there is nothing left hanging over when
            // another view gets rendered in the future by the application developer.
            $this->factory->flushStateIfDoneRendering();
 
            return ! is_null($response) ? $response : $contents;
        } catch (Throwable $e) {
            $this->factory->flushState();
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
/home/runcloud/webapps/canso-prod/vendor/wp-kit/utils/helpers.php
    }
 
    if ( ! function_exists('view') ) {
        
        /**
         * Helper function to build views.
         *
         * @param string $view      The view relative path, name.
         * @param array  $data      Passed data.
         * @param array  $mergeData
         *
         * @return string
         */
        function view($view = null, array $data = [], array $mergeData = [])
        {
            $factory = app('view');
            if (func_num_args() === 0) {
                return $factory;
            }
            return $factory->make($view, $data, $mergeData)->render();
        }
        
    }
    
    /*----------------------------------------------*\
        #PATHS
    \*----------------------------------------------*/
 
    if( ! function_exists('resources_path') ) {
        
        /**
         * Gets the resources path
         *
         * @return string
         */
        function resources_path($path = '', $file = '')
        {
            if( function_exists('themosis_path') ) {
                $root = themosis_path('theme.resources');
            } else {
/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/loops/publication.php
<?= view('archive.filters.publication'); ?>
 
<?= view('archive.featured.publication'); ?>
 
<?php 
 
    $posts_per_page = -1;
    
    $args = apply_filters('taxonomy_filters', [
        'posts_per_page' => $posts_per_page,
        'post_type' => 'publication',
        'tax_query' => array(
            'publication_type' => array(
                'taxonomy' => 'publication_type',
                'field' => 'slug',
                'terms' => [
                    'best-practice',
                    'reports'
                ]
            )
        )
    ]);
    
    global $publication;
    
    if($publication) {
        $args['post__not_in'] = [$publication->ID];
    }
    
    query_posts( $args );
    
    global $wp_query;
    
?>
 
<?php if( have_posts() ) : ?>
 
    <div class="grid-x grid-margin-x grid-margin-y js-posts mg-b-2">
    
        <?php $i = 0; while( have_posts() ) : the_post(); ?>
/home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php
 
    /**
     * Get the returned value of a file.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function getRequire($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
            return (static function () use ($__path, $__data) {
                extract($__data, EXTR_SKIP);
 
                return require $__path;
            })();
        }
 
        throw new FileNotFoundException("File does not exist at path {$path}.");
    }
 
    /**
     * Require the given file once.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function requireOnce($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
Arguments
  1. "/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/archive/loops/publication.php"
    
/home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php
    /**
     * Get the returned value of a file.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function getRequire($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
            return (static function () use ($__path, $__data) {
                extract($__data, EXTR_SKIP);
 
                return require $__path;
            })();
        }
 
        throw new FileNotFoundException("File does not exist at path {$path}.");
    }
 
    /**
     * Require the given file once.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function requireOnce($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php
    }
 
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    protected function evaluatePath($path, $data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            $this->files->getRequire($path, $data);
        } catch (Throwable $e) {
            $this->handleViewException($e, $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Throwable  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Throwable
     */
    protected function handleViewException(Throwable $e, $obLevel)
    {
        while (ob_get_level() > $obLevel) {
            ob_end_clean();
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php
     * Create a new file engine instance.
     *
     * @param  \Illuminate\Filesystem\Filesystem  $files
     * @return void
     */
    public function __construct(Filesystem $files)
    {
        $this->files = $files;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    public function get($path, array $data = [])
    {
        return $this->evaluatePath($path, $data);
    }
 
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    protected function evaluatePath($path, $data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            $this->files->getRequire($path, $data);
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
     * Get the data bound to the view instance.
     *
     * @return array
     */
    public function gatherData()
    {
        $data = array_merge($this->factory->getShared(), $this->data);
 
        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            }
        }
 
        return $data;
    }
 
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
     */
    protected function renderContents()
    {
        // We will keep track of the amount of views being rendered so we can flush
        // the section after the complete rendering operation is done. This will
        // clear out the sections for any separate views that may be rendered.
        $this->factory->incrementRender();
 
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
        $this->view = $view;
        $this->path = $path;
        $this->engine = $engine;
        $this->factory = $factory;
 
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
 
    /**
     * Get the string contents of the view.
     *
     * @param  callable|null  $callback
     * @return array|string
     *
     * @throws \Throwable
     */
    public function render(callable $callback = null)
    {
        try {
            $contents = $this->renderContents();
 
            $response = isset($callback) ? $callback($this, $contents) : null;
 
            // Once we have the contents of the view, we will flush the sections if we are
            // done rendering all views so that there is nothing left hanging over when
            // another view gets rendered in the future by the application developer.
            $this->factory->flushStateIfDoneRendering();
 
            return ! is_null($response) ? $response : $contents;
        } catch (Throwable $e) {
            $this->factory->flushState();
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
/home/runcloud/webapps/canso-prod/vendor/wp-kit/utils/helpers.php
    }
 
    if ( ! function_exists('view') ) {
        
        /**
         * Helper function to build views.
         *
         * @param string $view      The view relative path, name.
         * @param array  $data      Passed data.
         * @param array  $mergeData
         *
         * @return string
         */
        function view($view = null, array $data = [], array $mergeData = [])
        {
            $factory = app('view');
            if (func_num_args() === 0) {
                return $factory;
            }
            return $factory->make($view, $data, $mergeData)->render();
        }
        
    }
    
    /*----------------------------------------------*\
        #PATHS
    \*----------------------------------------------*/
 
    if( ! function_exists('resources_path') ) {
        
        /**
         * Gets the resources path
         *
         * @return string
         */
        function resources_path($path = '', $file = '')
        {
            if( function_exists('themosis_path') ) {
                $root = themosis_path('theme.resources');
            } else {
/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/blocks/acf/archive-loop.php
<?php if( is_admin() ) : ?>
 
    <div class="mg-v-2">
        
        <span>Post archive loop will show in the frontend</span>
        
    </div> 
 
<?php else : ?>
 
    <?= file_exists(view_path('archive/loops/' . get_post_type() . '.php')) ? view('archive.loops.'  . get_post_type()) : view('archive.loops.post'); ?>
    
<?php endif; ?>
/home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php
 
    /**
     * Get the returned value of a file.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function getRequire($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
            return (static function () use ($__path, $__data) {
                extract($__data, EXTR_SKIP);
 
                return require $__path;
            })();
        }
 
        throw new FileNotFoundException("File does not exist at path {$path}.");
    }
 
    /**
     * Require the given file once.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function requireOnce($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
Arguments
  1. "/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/views/blocks/acf/archive-loop.php"
    
/home/runcloud/webapps/canso-prod/vendor/illuminate/filesystem/Filesystem.php
    /**
     * Get the returned value of a file.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function getRequire($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
            return (static function () use ($__path, $__data) {
                extract($__data, EXTR_SKIP);
 
                return require $__path;
            })();
        }
 
        throw new FileNotFoundException("File does not exist at path {$path}.");
    }
 
    /**
     * Require the given file once.
     *
     * @param  string  $path
     * @param  array  $data
     * @return mixed
     *
     * @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
     */
    public function requireOnce($path, array $data = [])
    {
        if ($this->isFile($path)) {
            $__path = $path;
            $__data = $data;
 
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php
    }
 
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    protected function evaluatePath($path, $data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            $this->files->getRequire($path, $data);
        } catch (Throwable $e) {
            $this->handleViewException($e, $obLevel);
        }
 
        return ltrim(ob_get_clean());
    }
 
    /**
     * Handle a view exception.
     *
     * @param  \Throwable  $e
     * @param  int  $obLevel
     * @return void
     *
     * @throws \Throwable
     */
    protected function handleViewException(Throwable $e, $obLevel)
    {
        while (ob_get_level() > $obLevel) {
            ob_end_clean();
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/Engines/PhpEngine.php
     * Create a new file engine instance.
     *
     * @param  \Illuminate\Filesystem\Filesystem  $files
     * @return void
     */
    public function __construct(Filesystem $files)
    {
        $this->files = $files;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    public function get($path, array $data = [])
    {
        return $this->evaluatePath($path, $data);
    }
 
    /**
     * Get the evaluated contents of the view at the given path.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    protected function evaluatePath($path, $data)
    {
        $obLevel = ob_get_level();
 
        ob_start();
 
        // We'll evaluate the contents of the view inside a try/catch block so we can
        // flush out any stray output that might get out before an error occurs or
        // an exception is thrown. This prevents any partial views from leaking.
        try {
            $this->files->getRequire($path, $data);
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
     * Get the data bound to the view instance.
     *
     * @return array
     */
    public function gatherData()
    {
        $data = array_merge($this->factory->getShared(), $this->data);
 
        foreach ($data as $key => $value) {
            if ($value instanceof Renderable) {
                $data[$key] = $value->render();
            }
        }
 
        return $data;
    }
 
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
     */
    protected function renderContents()
    {
        // We will keep track of the amount of views being rendered so we can flush
        // the section after the complete rendering operation is done. This will
        // clear out the sections for any separate views that may be rendered.
        $this->factory->incrementRender();
 
        $this->factory->callComposer($this);
 
        $contents = $this->getContents();
 
        // Once we've finished rendering the view, we'll decrement the render count
        // so that each sections get flushed out next time a view is created and
        // no old sections are staying around in the memory of an environment.
        $this->factory->decrementRender();
 
        return $contents;
    }
 
    /**
     * Get the evaluated contents of the view.
     *
     * @return string
     */
    protected function getContents()
    {
        return $this->engine->get($this->path, $this->gatherData());
    }
 
    /**
/home/runcloud/webapps/canso-prod/vendor/illuminate/view/View.php
        $this->view = $view;
        $this->path = $path;
        $this->engine = $engine;
        $this->factory = $factory;
 
        $this->data = $data instanceof Arrayable ? $data->toArray() : (array) $data;
    }
 
    /**
     * Get the string contents of the view.
     *
     * @param  callable|null  $callback
     * @return array|string
     *
     * @throws \Throwable
     */
    public function render(callable $callback = null)
    {
        try {
            $contents = $this->renderContents();
 
            $response = isset($callback) ? $callback($this, $contents) : null;
 
            // Once we have the contents of the view, we will flush the sections if we are
            // done rendering all views so that there is nothing left hanging over when
            // another view gets rendered in the future by the application developer.
            $this->factory->flushStateIfDoneRendering();
 
            return ! is_null($response) ? $response : $contents;
        } catch (Throwable $e) {
            $this->factory->flushState();
 
            throw $e;
        }
    }
 
    /**
     * Get the contents of the view instance.
     *
     * @return string
/home/runcloud/webapps/canso-prod/vendor/wp-kit/utils/helpers.php
    }
 
    if ( ! function_exists('view') ) {
        
        /**
         * Helper function to build views.
         *
         * @param string $view      The view relative path, name.
         * @param array  $data      Passed data.
         * @param array  $mergeData
         *
         * @return string
         */
        function view($view = null, array $data = [], array $mergeData = [])
        {
            $factory = app('view');
            if (func_num_args() === 0) {
                return $factory;
            }
            return $factory->make($view, $data, $mergeData)->render();
        }
        
    }
    
    /*----------------------------------------------*\
        #PATHS
    \*----------------------------------------------*/
 
    if( ! function_exists('resources_path') ) {
        
        /**
         * Gets the resources path
         *
         * @return string
         */
        function resources_path($path = '', $file = '')
        {
            if( function_exists('themosis_path') ) {
                $root = themosis_path('theme.resources');
            } else {
/home/runcloud/webapps/canso-prod/web/app/themes/canso/resources/controllers/AppController.php
            
                $words = str_word_count($text, 2); 
            
                $position = array_keys($words);
                
                $text = substr($text, 0, $position[$limit]);
                
                $text .= $text ? $delimiter : ''; 
                
                return $text;
                
            }
            
            return $text; 
            
        }
        
        public static function renderBlock($block, $inner_blocks) {
            
            echo view('blocks.' . $block['name'], compact('block', 'inner_blocks'));
            
        }
    
    }
    
 
/home/runcloud/webapps/canso-prod/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php
    if ( ! $block ) {
        return '';
    }
 
    // Find post_id if not defined.
    if ( ! $post_id ) {
        $post_id = get_the_ID();
    }
 
    // Enqueue block type assets.
    acf_enqueue_block_type_assets( $block );
 
    $block = acf_add_block_meta_values( $block, $post_id );
 
    // Setup postdata allowing get_field() to work.
    acf_setup_meta( $block['data'], $block['id'], true );
 
    // Call render_callback.
    if ( is_callable( $block['render_callback'] ) ) {
        call_user_func( $block['render_callback'], $block, $content, $is_preview, $post_id, $wp_block, $context );
 
        // Or include template.
    } elseif ( $block['render_template'] ) {
        do_action( 'acf_block_render_template', $block, $content, $is_preview, $post_id, $wp_block, $context );
    }
 
    // Reset postdata.
    acf_reset_meta( $block['id'] );
}
 
/**
 * Locate and include an ACF block's template.
 *
 * @since   6.0.4
 *
 * @param   array $block The block props.
 */
function acf_block_render_template( $block, $content, $is_preview, $post_id, $wp_block, $context ) {
    // Locate template.
    if ( isset( $block['path'] ) && file_exists( $block['path'] . '/' . $block['render_template'] ) ) {
/home/runcloud/webapps/canso-prod/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php
        $block = acf_add_block_meta_values( $block, $post_id );
        acf_setup_meta( $block['data'], $block['id'], true );
 
        if ( ! empty( $block['validate'] ) ) {
            $validation = acf_get_block_validation_state( $block, false, false, true );
        }
 
        $fields = acf_get_block_fields( $block );
        if ( $fields ) {
            acf_prefix_fields( $fields, "acf-{$block['id']}" );
 
            echo '<div class="acf-block-fields acf-fields" data-block-id="' . esc_attr( $block['id'] ) . '">';
            acf_render_fields( $fields, acf_ensure_block_id_prefix( $block['id'] ), 'div', 'field' );
            echo '</div>';
        } else {
            echo acf_get_empty_block_form_html( $attributes['name'] ); //phpcs:ignore -- escaped in function.
        }
    } else {
        // Capture block render output.
        acf_render_block( $attributes, $content, $is_preview, $post_id, $wp_block, $context );
 
        if ( $is_preview && ! $is_ajax_render ) {
            /**
             * If we're in preloaded preview, we need to get the validation state for a preview too.
             * Because the block render resets meta once it's finished to not pollute $post_id, we need to redo that process here.
             */
            $block = acf_prepare_block( $attributes );
            $block = acf_add_block_meta_values( $block, $post_id );
            acf_setup_meta( $block['data'], $block['id'], true );
            if ( ! empty( $block['validate'] ) ) {
                $validation = acf_get_block_validation_state( $block, false, false, true );
            }
        }
    }
 
    $html = ob_get_clean();
    $html = is_string( $html ) ? $html : '';
 
    // Replace <InnerBlocks /> placeholder on front-end, or if we're rendering an ACF block inside another ACF block template.
    if ( ! $is_preview || doing_action( 'acf_block_render_template' ) ) {
/home/runcloud/webapps/canso-prod/web/app/plugins/advanced-custom-fields-pro/pro/blocks.php
 * @param   WP_Block $wp_block   The block instance (since WP 5.5).
 * @return  string The block HTML.
 */
function acf_render_block_callback( $attributes, $content = '', $wp_block = null ) {
 
    $is_preview = false;
    $post_id    = get_the_ID();
 
    // Set preview flag to true when rendering for the block editor.
    if ( is_admin() && acf_is_block_editor() ) {
        $is_preview = true;
    }
 
    // If ACF's block save method hasn't been called yet, try to initialize a default block.
    if ( empty( $attributes['name'] ) && ! empty( $wp_block->name ) ) {
        $attributes['name'] = $wp_block->name;
    }
 
    // Return rendered block HTML.
    return acf_rendered_block( $attributes, $content, $is_preview, $post_id, $wp_block );
}
 
/**
 * Returns the rendered block HTML.
 *
 * @date    28/2/19
 * @since   5.7.13
 *
 * @param   array    $attributes     The block attributes.
 * @param   string   $content        The block content.
 * @param   boolean  $is_preview     Whether or not the block is being rendered for editing preview.
 * @param   integer  $post_id        The current post being edited or viewed.
 * @param   WP_Block $wp_block       The block instance (since WP 5.5).
 * @param   array    $context        The block context array.
 * @param   boolean  $is_ajax_render Whether or not this is an ACF AJAX render.
 * @return  string   The block HTML.
 */
function acf_rendered_block( $attributes, $content = '', $is_preview = false, $post_id = 0, $wp_block = null, $context = false, $is_ajax_render = false ) {
    $mode = isset( $attributes['mode'] ) ? $attributes['mode'] : 'auto';
    $form = ( 'edit' === $mode && $is_preview );
/home/runcloud/webapps/canso-prod/web/wp/wp-includes/class-wp-block.php
                    }
 
                    ++$index;
                }
            }
        }
 
        if ( ! empty( $computed_attributes ) && ! empty( $block_content ) ) {
            foreach ( $computed_attributes as $attribute_name => $source_value ) {
                $block_content = $this->replace_html( $block_content, $attribute_name, $source_value );
            }
        }
 
        if ( $is_dynamic ) {
            $global_post = $post;
            $parent      = WP_Block_Supports::$block_to_render;
 
            WP_Block_Supports::$block_to_render = $this->parsed_block;
 
            $block_content = (string) call_user_func( $this->block_type->render_callback, $this->attributes, $block_content, $this );
 
            WP_Block_Supports::$block_to_render = $parent;
 
            $post = $global_post;
        }
 
        if ( ( ! empty( $this->block_type->script_handles ) ) ) {
            foreach ( $this->block_type->script_handles as $script_handle ) {
                wp_enqueue_script( $script_handle );
            }
        }
 
        if ( ! empty( $this->block_type->view_script_handles ) ) {
            foreach ( $this->block_type->view_script_handles as $view_script_handle ) {
                wp_enqueue_script( $view_script_handle );
            }
        }
 
        if ( ! empty( $this->block_type->view_script_module_ids ) ) {
            foreach ( $this->block_type->view_script_module_ids as $view_script_module_id ) {
/home/runcloud/webapps/canso-prod/web/wp/wp-includes/blocks.php
     *
     * @param array         $context      Default context.
     * @param array         $parsed_block {
     *     An associative array of the block being rendered. See WP_Block_Parser_Block.
     *
     *     @type string   $blockName    Name of block.
     *     @type array    $attrs        Attributes from block comment delimiters.
     *     @type array[]  $innerBlocks  List of inner blocks. An array of arrays that
     *                                  have the same structure as this one.
     *     @type string   $innerHTML    HTML from inside block comment delimiters.
     *     @type array    $innerContent List of string fragments and null markers where
     *                                  inner blocks were found.
     * }
     * @param WP_Block|null $parent_block If this is a nested block, a reference to the parent block.
     */
    $context = apply_filters( 'render_block_context', $context, $parsed_block, $parent_block );
 
    $block = new WP_Block( $parsed_block, $context );
 
    return $block->render();
}
 
/**
 * Parses blocks out of a content string.
 *
 * @since 5.0.0
 *
 * @param string $content Post content.
 * @return array[] {
 *     Array of block structures.
 *
 *     @type array ...$0 {
 *         An associative array of a single parsed block object. See WP_Block_Parser_Block.
 *
 *         @type string   $blockName    Name of block.
 *         @type array    $attrs        Attributes from block comment delimiters.
 *         @type array[]  $innerBlocks  List of inner blocks. An array of arrays that
 *                                      have the same structure as this one.
 *         @type string   $innerHTML    HTML from inside block comment delimiters.
 *         @type array    $innerContent List of string fragments and null markers where
/home/runcloud/webapps/canso-prod/web/wp/wp-includes/blocks.php
     * Parsed blocks consist of a list of top-level blocks. Those top-level
     * blocks may themselves contain nested inner blocks. However, every
     * top-level block is rendered independently, meaning there are no data
     * dependencies between them.
     *
     * Ideally, therefore, the parser would only need to parse one complete
     * top-level block at a time, render it, and move on. Unfortunately, this
     * is not possible with {@see \parse_blocks()} because it must parse the
     * entire given document at once.
     *
     * While the current implementation prevents this optimization, it’s still
     * possible to reduce the peak memory use when calls to `render_block()`
     * on those top-level blocks are memory-heavy (which many of them are).
     * By setting each parsed block to `NULL` after rendering it, any memory
     * allocated during the render will be freed and reused for the next block.
     * Before making this change, that memory was retained and would lead to
     * out-of-memory crashes for certain posts that now run with this change.
     */
    for ( $i = 0; $i < $top_level_block_count; $i++ ) {
        $output      .= render_block( $blocks[ $i ] );
        $blocks[ $i ] = null;
    }
 
    // If there are blocks in this content, we shouldn't run wpautop() on it later.
    $priority = has_filter( 'the_content', 'wpautop' );
    if ( false !== $priority && doing_filter( 'the_content' ) && has_blocks( $content ) ) {
        remove_filter( 'the_content', 'wpautop', $priority );
        add_filter( 'the_content', '_restore_wpautop_hook', $priority + 1 );
    }
 
    return $output;
}
 
/**
 * If do_blocks() needs to remove wpautop() from the `the_content` filter, this re-adds it afterwards,
 * for subsequent `the_content` usage.
 *
 * @since 5.0.0
 * @access private
 *
/home/runcloud/webapps/canso-prod/web/wp/wp-includes/class-wp-hook.php
 
        $this->iterations[ $nesting_level ] = $this->priorities;
 
        $num_args = count( $args );
 
        do {
            $this->current_priority[ $nesting_level ] = current( $this->iterations[ $nesting_level ] );
 
            $priority = $this->current_priority[ $nesting_level ];
 
            foreach ( $this->callbacks[ $priority ] as $the_ ) {
                if ( ! $this->doing_action ) {
                    $args[0] = $value;
                }
 
                // Avoid the array_slice() if possible.
                if ( 0 === $the_['accepted_args'] ) {
                    $value = call_user_func( $the_['function'] );
                } elseif ( $the_['accepted_args'] >= $num_args ) {
                    $value = call_user_func_array( $the_['function'], $args );
                } else {
                    $value = call_user_func_array( $the_['function'], array_slice( $args, 0, $the_['accepted_args'] ) );
                }
            }
        } while ( false !== next( $this->iterations[ $nesting_level ] ) );
 
        unset( $this->iterations[ $nesting_level ] );
        unset( $this->current_priority[ $nesting_level ] );
 
        --$this->nesting_level;
 
        return $value;
    }
 
    /**
     * Calls the callback functions that have been added to an action hook.
     *
     * @since 4.7.0
     *
     * @param array $args Parameters to pass to the callback functions.
/home/runcloud/webapps/canso-prod/web/wp/wp-includes/plugin.php
        $all_args = func_get_args(); // phpcs:ignore PHPCompatibility.FunctionUse.ArgumentFunctionsReportCurrentValue.NeedsInspection
        _wp_call_all_hook( $all_args );
    }
 
    if ( ! isset( $wp_filter[ $hook_name ] ) ) {
        if ( isset( $wp_filter['all'] ) ) {
            array_pop( $wp_current_filter );
        }
 
        return $value;
    }
 
    if ( ! isset( $wp_filter['all'] ) ) {
        $wp_current_filter[] = $hook_name;
    }
 
    // Pass the value to WP_Hook.
    array_unshift( $args, $value );
 
    $filtered = $wp_filter[ $hook_name ]->apply_filters( $value, $args );
 
    array_pop( $wp_current_filter );
 
    return $filtered;
}
 
/**
 * Calls the callback functions that have been added to a filter hook, specifying arguments in an array.
 *
 * @since 3.0.0
 *
 * @see apply_filters() This function is identical, but the arguments passed to the
 *                      functions hooked to `$hook_name` are supplied using an array.
 *
 * @global WP_Hook[] $wp_filter         Stores all of the filters and actions.
 * @global int[]     $wp_filters        Stores the number of times each filter was triggered.
 * @global string[]  $wp_current_filter Stores the list of current filters with the current one last.
 *
 * @param string $hook_name The name of the filter hook.
 * @param array  $args      The arguments supplied to the functions hooked to `$hook_name`.
/home/runcloud/webapps/canso-prod/web/app/themes/canso/index.php
 
<?php 
    
    global $wp_query;
    
    $post_type = $wp_query->query_vars['post_type'] ?: get_post_type();
    
    $page_id = $GLOBALS['pages_for_posts'][$post_type]; 
    
?>
 
<section class="h-100">
    
    <?= view('page.banner', ['image_id' => get_field('banner_image', $page_id) ?: get_post_thumbnail_id($page_id), 'page_id' => $page_id]); ?>
    
    <div class="pd-v-3 grid-container">
            
        <h1 class="mg-b-1"><?= $page_id ? get_the_title( $page_id ) : ( post_type_archive_title('', false) ?: single_term_title('', false)  ); ?></h1>
        
        <?= $page_id ? apply_filters( 'the_content', get_post($page_id)->post_content ) : ''; ?>
        
    </div>
        
</section>
 
<?php get_footer(); ?>
 
/home/runcloud/webapps/canso-prod/web/wp/wp-includes/template-loader.php
            }
 
            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;
}
 
Arguments
  1. "/home/runcloud/webapps/canso-prod/web/app/themes/canso/index.php"
    
/home/runcloud/webapps/canso-prod/web/wp/wp-blog-header.php
<?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';
 
}
 
Arguments
  1. "/home/runcloud/webapps/canso-prod/web/wp/wp-includes/template-loader.php"
    
/home/runcloud/webapps/canso-prod/web/index.php
<?php
 
/** WordPress view bootstrapper */
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
 
Arguments
  1. "/home/runcloud/webapps/canso-prod/web/wp/wp-blog-header.php"
    

Environment & details:

Key Value
page
"5"
date_filter_1
0 of 0
array:1 [ "value" => array:1 [ "year" => "" ] ]
amp;field_programmes_tid
"3"
amp;field_regions_tid
"All"
amp;field_canso_tags_tid
"All"
amp;sort_by
"published_at"
amp;sort_order
"DESC"
amp;
"Apply"
empty
empty
empty
empty
Key Value
SERVER_SOFTWARE
"Apache/2.4.63 (Unix) OpenSSL/1.1.1f"
REQUEST_URI
"/publications/?page=5&date_filter_1%5Bvalue%5D%5Byear%5D=&amp%3Bfield_programmes_tid=3&amp%3Bfield_regions_tid=All&amp%3Bfield_canso_tags_tid=All&amp%3Bsort_by=published_at&amp%3Bsort_order=DESC&amp%3B=Apply/publications/?page=5&date_filter_1%5Bvalue%5D%5Byear%5D=&amp%3Bfield_programmes_tid=3&amp%3Bfield_regions_tid=All&amp%3Bfield_canso_tags_tid=All&amp%3Bsort_by="
USER
"runcloud"
HOME
"/home/runcloud"
SCRIPT_NAME
"/index.php"
QUERY_STRING
"page=5&date_filter_1%5Bvalue%5D%5Byear%5D=&amp%3Bfield_programmes_tid=3&amp%3Bfield_regions_tid=All&amp%3Bfield_canso_tags_tid=All&amp%3Bsort_by=published_at&amp%3Bsort_order=DESC&amp%3B=Applypage=5&date_filter_1%5Bvalue%5D%5Byear%5D=&amp%3Bfield_programmes_tid=3&amp%3Bfield_regions_tid=All&amp%3Bfield_canso_tags_tid=All&amp%3Bsort_by=published_at&am"
REQUEST_METHOD
"GET"
SERVER_PROTOCOL
"HTTP/1.0"
GATEWAY_INTERFACE
"CGI/1.1"
REDIRECT_QUERY_STRING
"page=5&date_filter_1%5Bvalue%5D%5Byear%5D=&amp%3Bfield_programmes_tid=3&amp%3Bfield_regions_tid=All&amp%3Bfield_canso_tags_tid=All&amp%3Bsort_by=published_at&amp%3Bsort_order=DESC&amp%3B=Applypage=5&date_filter_1%5Bvalue%5D%5Byear%5D=&amp%3Bfield_programmes_tid=3&amp%3Bfield_regions_tid=All&amp%3Bfield_canso_tags_tid=All&amp%3Bsort_by=published_at&am"
REDIRECT_URL
"/publications/"
REMOTE_PORT
"56452"
SCRIPT_FILENAME
"/home/runcloud/webapps/canso-prod/web/index.php"
SERVER_ADMIN
"you@example.com"
CONTEXT_DOCUMENT_ROOT
"/home/runcloud/webapps/canso-prod/web/"
CONTEXT_PREFIX
""
REQUEST_SCHEME
"http"
DOCUMENT_ROOT
"/home/runcloud/webapps/canso-prod/web/"
REMOTE_ADDR
"216.73.216.30"
SERVER_PORT
"80"
SERVER_ADDR
"127.0.0.1"
SERVER_NAME
"canso.org"
SERVER_SIGNATURE
""
LD_LIBRARY_PATH
"/RunCloud/Packages/apache2-rc/lib"
PATH
"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
HTTP_PRIORITY
"u=0, i"
HTTP_ACCEPT_ENCODING
"gzip, deflate, br, zstd"
HTTP_SEC_FETCH_DEST
"document"
HTTP_SEC_FETCH_USER
"?1"
HTTP_SEC_FETCH_MODE
"navigate"
HTTP_SEC_FETCH_SITE
"none"
HTTP_ACCEPT
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"
HTTP_USER_AGENT
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
HTTP_UPGRADE_INSECURE_REQUESTS
"1"
HTTP_SEC_CH_UA_PLATFORM
"\"Windows\""
HTTP_SEC_CH_UA_MOBILE
"?0"
HTTP_SEC_CH_UA
"\"Chromium\";v=\"130\", \"HeadlessChrome\";v=\"130\", \"Not?A_Brand\";v=\"99\""
HTTP_CACHE_CONTROL
"no-cache"
HTTP_PRAGMA
"no-cache"
HTTP_CONNECTION
"close"
HTTP_X_FORWARDED_PROTO
"https"
HTTP_X_FORWARDED_FOR
"216.73.216.30"
HTTP_X_SERVER_ADDR
"178.62.231.199"
HTTP_HOST
"canso.org"
HTTP_AUTHORIZATION
""
HTTPS
"on"
REDIRECT_STATUS
"200"
REDIRECT_HTTP_AUTHORIZATION
""
REDIRECT_HTTPS
"on"
FCGI_ROLE
"RESPONDER"
PHP_SELF
"/index.php"
REQUEST_TIME_FLOAT
1753806693.3902
REQUEST_TIME
1753806693
DB_NAME
"canso_prod_database"
DB_USER
"canso_prod"
DB_PASSWORD
"Jft#Y_SC@ZoQP~PxTSf7q+Vz_#lPe@~J"
WP_ENV
"production"
WP_HOME
"https://canso.org"
WP_SITEURL
"https://canso.org/wp"
AUTH_KEY
"generateme"
SECURE_AUTH_KEY
"generateme"
LOGGED_IN_KEY
"generateme"
NONCE_KEY
"generateme"
AUTH_SALT
"generateme"
SECURE_AUTH_SALT
"generateme"
LOGGED_IN_SALT
"generateme"
NONCE_SALT
"generateme"
ADMIN_COLUMNS_PRO_KEY
"93d36a90-7700-4e7b-891f-f1336fa12aa8"
ACF_PRO_KEY
"b3JkZXJfaWQ9NTA3MTh8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE1LTAyLTI0IDE2OjM5OjA1"
WP_ALL_IMPORT_PRO_KEY
"97cb50a1883ad6cfacfaa1ebfe26b3fe"
WP_ALL_IMPORT_PRO_URL
"https://canso.org"
WP_ALL_EXPORT_PRO_KEY
"01503ee4e510b1fcf0e80f41d65e3dce"
WP_ALL_EXPORT_PRO_URL
"https://canso.org"
WP_PLUGIN_GF_KEY
"84d93766bc3f74815f28ec312b5699b8"
DOS_STORAGE_FILE_ONLY
"true"
DOS_STORAGE_FILE_DELETE
"true"
DOS_CONTAINER
"canso"
DOS_ENDPOINT
"https://fra1.digitaloceanspaces.com"
DOS_STORAGE_PATH
"/uploads"
DOS_KEY
"XY55QP4ND4Q7FQ3LWCQL"
DOS_SECRET
"0VUcYOXmktpgav690v0akA+HVH+A0aVBf00ikQAg60Y"
UPLOAD_URL_PATH
"https://canso.fra1.digitaloceanspaces.com"
PRIVATE_UPLOAD_PATH
"/file"
PRIVATE_UPLOAD_URL_PATH
"https://canso.org/file"
HUBSPOT_API_KEY
"pat-na1-d3178711-7708-4282-bf88-5a30ec1db4b1"
HUBSPOT_USE_OAUTH2
"true"
HUBSPOT_APP_CLIENT_ID
"8c186cb2-aed8-49f4-a45f-46a4f1207762"
HUBSPOT_APP_CLIENT_SECRET
"df649b75-fa5d-419e-8c05-e5ef76d5746d"
HUBSPOT_APP_REDIRECT_URL
"https://canso.org/wp-json/canso/v1/hubspot/auth"
TRACKS_API_URL
"https://cdsglobaltargetcount.azurewebsites.net/api/GlobalTargetCountTrigger"
TEST_NETWORK_EMAILS
"true"
OLD_FILES_PATH
"/home/runcloud/old/"
Key Value
DB_NAME
"canso_prod_database"
DB_USER
"canso_prod"
DB_PASSWORD
"Jft#Y_SC@ZoQP~PxTSf7q+Vz_#lPe@~J"
WP_ENV
"production"
WP_HOME
"https://canso.org"
WP_SITEURL
"https://canso.org/wp"
AUTH_KEY
"generateme"
SECURE_AUTH_KEY
"generateme"
LOGGED_IN_KEY
"generateme"
NONCE_KEY
"generateme"
AUTH_SALT
"generateme"
SECURE_AUTH_SALT
"generateme"
LOGGED_IN_SALT
"generateme"
NONCE_SALT
"generateme"
ADMIN_COLUMNS_PRO_KEY
"93d36a90-7700-4e7b-891f-f1336fa12aa8"
ACF_PRO_KEY
"b3JkZXJfaWQ9NTA3MTh8dHlwZT1kZXZlbG9wZXJ8ZGF0ZT0yMDE1LTAyLTI0IDE2OjM5OjA1"
WP_ALL_IMPORT_PRO_KEY
"97cb50a1883ad6cfacfaa1ebfe26b3fe"
WP_ALL_IMPORT_PRO_URL
"https://canso.org"
WP_ALL_EXPORT_PRO_KEY
"01503ee4e510b1fcf0e80f41d65e3dce"
WP_ALL_EXPORT_PRO_URL
"https://canso.org"
WP_PLUGIN_GF_KEY
"84d93766bc3f74815f28ec312b5699b8"
DOS_STORAGE_FILE_ONLY
"true"
DOS_STORAGE_FILE_DELETE
"true"
DOS_CONTAINER
"canso"
DOS_ENDPOINT
"https://fra1.digitaloceanspaces.com"
DOS_STORAGE_PATH
"/uploads"
DOS_KEY
"XY55QP4ND4Q7FQ3LWCQL"
DOS_SECRET
"0VUcYOXmktpgav690v0akA+HVH+A0aVBf00ikQAg60Y"
UPLOAD_URL_PATH
"https://canso.fra1.digitaloceanspaces.com"
PRIVATE_UPLOAD_PATH
"/file"
PRIVATE_UPLOAD_URL_PATH
"https://canso.org/file"
HUBSPOT_API_KEY
"pat-na1-d3178711-7708-4282-bf88-5a30ec1db4b1"
HUBSPOT_USE_OAUTH2
"true"
HUBSPOT_APP_CLIENT_ID
"8c186cb2-aed8-49f4-a45f-46a4f1207762"
HUBSPOT_APP_CLIENT_SECRET
"df649b75-fa5d-419e-8c05-e5ef76d5746d"
HUBSPOT_APP_REDIRECT_URL
"https://canso.org/wp-json/canso/v1/hubspot/auth"
TRACKS_API_URL
"https://cdsglobaltargetcount.azurewebsites.net/api/GlobalTargetCountTrigger"
TEST_NETWORK_EMAILS
"true"
OLD_FILES_PATH
"/home/runcloud/old/"
0. Whoops\Handler\PrettyPageHandler