//https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
add_action( 'nav_menu_css_class', 'ifour_add_cpt_ancestor_class', 10, 3 );
function ifour_add_cpt_ancestor_class( $classes, $item, $args ) {
global $post;
$current_post_type = get_post_type_object( get_post_type( $post->ID ) );
$current_post_type_slug = $current_post_type->rewrite[ 'slug' ] ?? false;
$menu_slug = strtolower( trim( $item->url ) );
if( !empty($current_post_type_slug) && strpos( $menu_slug, $current_post_type_slug ) !== false )
$classes[] = 'current_page_parent';
return $classes;
// 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());
}
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<body <?php body_class(); ?> x-data="body">
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @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() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
//https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
add_action( 'nav_menu_css_class', 'ifour_add_cpt_ancestor_class', 10, 3 );
function ifour_add_cpt_ancestor_class( $classes, $item, $args ) {
global $post;
$current_post_type = get_post_type_object( get_post_type( $post->ID ) );
$current_post_type_slug = $current_post_type->rewrite[ 'slug' ] ?? false;
$menu_slug = strtolower( trim( $item->url ) );
if( !empty($current_post_type_slug) && strpos( $menu_slug, $current_post_type_slug ) !== false )
$classes[] = 'current_page_parent';
return $classes;
// 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());
}
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<p class="mt-12">Sorry, the page you are looking for could not be found</p>
<p class="mt-12 text-xs"><a class="btn" href="/" title="Home"><span>Return to home</span></a></p>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/404.blade.php ENDPATH**/ ?>
$__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}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// 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());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<body <?php body_class(); ?> x-data="body">
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @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() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
//https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
add_action( 'nav_menu_css_class', 'ifour_add_cpt_ancestor_class', 10, 3 );
function ifour_add_cpt_ancestor_class( $classes, $item, $args ) {
global $post;
$current_post_type = get_post_type_object( get_post_type( $post->ID ) );
$current_post_type_slug = $current_post_type->rewrite[ 'slug' ] ?? false;
$menu_slug = strtolower( trim( $item->url ) );
if( !empty($current_post_type_slug) && strpos( $menu_slug, $current_post_type_slug ) !== false )
$classes[] = 'current_page_parent';
return $classes;
// 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());
}
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<a class="sr-only focus:not-sr-only" href="#main">
<?php echo e(__('Skip to content')); ?>
</a>
<?php echo $__env->make('sections.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<main id="main" class="main">
<?php echo $__env->yieldContent('content'); ?>
</main>
$__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}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// 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());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<p class="mt-12">Sorry, the page you are looking for could not be found</p>
<p class="mt-12 text-xs"><a class="btn" href="/" title="Home"><span>Return to home</span></a></p>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/404.blade.php ENDPATH**/ ?>
$__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}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// 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());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<body <?php body_class(); ?> x-data="body">
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @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() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
//https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
add_action( 'nav_menu_css_class', 'ifour_add_cpt_ancestor_class', 10, 3 );
function ifour_add_cpt_ancestor_class( $classes, $item, $args ) {
global $post;
$current_post_type = get_post_type_object( get_post_type( $post->ID ) );
$current_post_type_slug = $current_post_type->rewrite[ 'slug' ] ?? false;
$menu_slug = strtolower( trim( $item->url ) );
if( !empty($current_post_type_slug) && strpos( $menu_slug, $current_post_type_slug ) !== false )
$classes[] = 'current_page_parent';
return $classes;
* @throws \ErrorException
*/
public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
try {
parent::handleError($level, $message, $file, $line, $context);
} catch (Throwable $e) {
if (! apply_filters('acorn/throw_error_exception', true, $e)) {
return false;
}
//https://wordpress.stackexchange.com/questions/206523/remove-current-page-parent-nav-class-from-blog-index-when-in-cpt
add_action( 'nav_menu_css_class', 'ifour_add_cpt_ancestor_class', 10, 3 );
function ifour_add_cpt_ancestor_class( $classes, $item, $args ) {
global $post;
$current_post_type = get_post_type_object( get_post_type( $post->ID ) );
$current_post_type_slug = $current_post_type->rewrite[ 'slug' ] ?? false;
$menu_slug = strtolower( trim( $item->url ) );
if( !empty($current_post_type_slug) && strpos( $menu_slug, $current_post_type_slug ) !== false )
$classes[] = 'current_page_parent';
return $classes;
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 ] );
}
// 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;
}
* @param string[] $classes Array of the CSS classes that are applied to the menu item's `<li>` element.
* @param WP_Post $menu_item The current menu item object.
* @param stdClass $args An object of wp_nav_menu() arguments.
* @param int $depth Depth of menu item. Used for padding.
*/
$class_names = implode( ' ', apply_filters( 'nav_menu_css_class', array_filter( $classes ), $menu_item, $args, $depth ) );
/**
* Filters the ID attribute applied to a menu item's list item element.
*
* @since 3.0.1
$this->has_children = ! empty( $children_elements[ $id ] );
if ( isset( $args[0] ) && is_array( $args[0] ) ) {
$args[0]['has_children'] = $this->has_children; // Back-compat.
}
$this->start_el( $output, $element, $depth, ...array_values( $args ) );
// Descend only when the depth is right and there are children for this element.
if ( ( 0 == $max_depth || $max_depth > $depth + 1 ) && isset( $children_elements[ $id ] ) ) {
foreach ( $children_elements[ $id ] as $child ) {
}
}
}
foreach ( $top_level_elements as $e ) {
$this->display_element( $e, $children_elements, $max_depth, 0, $args, $output );
}
/*
* If we are displaying all levels, and remaining children_elements is not empty,
* then we got orphans, which should be displayed regardless.
* @return string The HTML list content for the menu items.
*/
function walk_nav_menu_tree( $items, $depth, $args ) {
$walker = ( empty( $args->walker ) ) ? new Walker_Nav_Menu() : $args->walker;
return $walker->walk( $items, $depth, $args );
}
/**
* Prevents a menu item ID from being used more than once.
*
* @param array $sorted_menu_items The menu items, sorted by each menu item's menu order.
* @param stdClass $args An object containing wp_nav_menu() arguments.
*/
$sorted_menu_items = apply_filters( 'wp_nav_menu_objects', $sorted_menu_items, $args );
$items .= walk_nav_menu_tree( $sorted_menu_items, $args->depth, $args );
unset( $sorted_menu_items );
// Attributes.
if ( ! empty( $args->menu_id ) ) {
$wrap_id = $args->menu_id;
<?php endif; ?>
</a>
<div class="burger-close" @click="mobileNav = !mobileNav"></div>
</div>
<?php echo wp_nav_menu([
'menu' => 'main-menu',
'menu_id' => 'mobile-menu',
'echo' => false,
'container' => false
]); ?>
$__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}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// 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());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<a class="sr-only focus:not-sr-only" href="#main">
<?php echo e(__('Skip to content')); ?>
</a>
<?php echo $__env->make('sections.header', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<main id="main" class="main">
<?php echo $__env->yieldContent('content'); ?>
</main>
$__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}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// 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());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<p class="mt-12">Sorry, the page you are looking for could not be found</p>
<p class="mt-12 text-xs"><a class="btn" href="/" title="Home"><span>Return to home</span></a></p>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/404.blade.php ENDPATH**/ ?>
$__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}.");
}
return (static function () use ($__path, $__data) {
extract($__data, EXTR_SKIP);
return require $__path;
})();
}
throw new FileNotFoundException("File does not exist at path {$path}.");
}
// 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());
}
// Once we have the path to the compiled file, we will evaluate the paths with
// typical PHP just like any other templates. We also keep a stack of views
// which have been rendered for right exception messages to be generated.
$results = $this->evaluatePath($this->compiler->getCompiledPath($path), $data);
array_pop($this->lastCompiled);
return $results;
}
*
* @return string
*/
protected function getContents()
{
return $this->engine->get($this->path, $this->gatherData());
}
/**
* Get the data bound to the view instance.
*
// 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();
* @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
<body <?php body_class(); ?> x-data="body">
<?php wp_body_open(); ?>
<?php do_action('get_header'); ?>
<div id="app">
<?php echo view(app('sage.view'), app('sage.data'))->render(); ?>
</div>
<?php do_action('get_footer'); ?>
<?php wp_footer(); ?>
</body>
*
* @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() );
}
// Set up the WordPress query.
wp();
// Load the theme template.
require_once ABSPATH . WPINC . '/template-loader.php';
}
* @var bool
*/
define( 'WP_USE_THEMES', true );
/** Loads the WordPress Environment and Template */
require __DIR__ . '/wp-blog-header.php';
[4/4]
ViewException
|
---|
Illuminate\View\ViewException: Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100 at Illuminate\View\Engines\CompilerEngine->handleViewException() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:60) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38) at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106) at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17) |
[3/4]
ViewException
|
---|
Illuminate\View\ViewException: Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100 at Illuminate\View\Engines\CompilerEngine->handleViewException() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:60) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php:10) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107) at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38) at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106) at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17) |
[2/4]
ViewException
|
---|
Illuminate\View\ViewException: Trying to get property 'ID' of non-object (View: /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/resources/views/sections/header.blade.php) at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100 at Illuminate\View\Engines\CompilerEngine->handleViewException() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:60) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php:6) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107) at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php:10) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107) at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38) at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106) at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17) |
[1/4]
ErrorException
|
---|
ErrorException: Trying to get property 'ID' of non-object at /var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:54) at Roots\Acorn\Bootstrap\HandleExceptions->handleError() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/inc/theme-setup.php:100) at ifour_add_cpt_ancestor_class() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-wp-hook.php:326) at WP_Hook->apply_filters() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/plugin.php:205) at apply_filters() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-walker-nav-menu.php:176) at Walker_Nav_Menu->start_el() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-wp-walker.php:147) at Walker->display_element() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/class-wp-walker.php:247) at Walker->walk() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/nav-menu-template.php:616) at walk_nav_menu_tree() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/nav-menu-template.php:236) at wp_nav_menu() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/64a256582289f5d17c9bd64360c7bfa52b9da892.php:22) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/64a256582289f5d17c9bd64360c7bfa52b9da892.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107) at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php:6) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/0cbaa4741143c0d3c11db0ce16b78eef1adb63e1.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107) at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php:10) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/cache/acorn/framework/views/dcb20a8246d5b7ac0387425dbec8e14967e28180.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:107) at Illuminate\Filesystem\Filesystem::Illuminate\Filesystem\{closure}() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/filesystem/Filesystem.php:108) at Illuminate\Filesystem\Filesystem->getRequire() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/PhpEngine.php:58) at Illuminate\View\Engines\PhpEngine->evaluatePath() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/Engines/CompilerEngine.php:61) at Illuminate\View\Engines\CompilerEngine->get() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:139) at Illuminate\View\View->getContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:122) at Illuminate\View\View->renderContents() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/vendor/illuminate/view/View.php:91) at Illuminate\View\View->render() (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php:38) at include('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-content/themes/ifour/index.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php:106) at require_once('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-includes/template-loader.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php:19) at require('/var/www/vhosts/ifour.co.uk/subs/production/htdocs/wp-blog-header.php') (/var/www/vhosts/ifour.co.uk/subs/production/htdocs/index.php:17) |