/**
* First we get the no index option for this taxonomy, because it can be overwritten the indexable value for
* this specific term.
*/
if ( ! $this->taxonomy->is_indexable( $this->source->taxonomy ) ) {
$robots['index'] = 'noindex';
}
/**
* Overwrite the index directive when there is a term specific directive set.
* @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;
}
/**
* First we get the no index option for this taxonomy, because it can be overwritten the indexable value for
* this specific term.
*/
if ( ! $this->taxonomy->is_indexable( $this->source->taxonomy ) ) {
$robots['index'] = 'noindex';
}
/**
* Overwrite the index directive when there is a term specific directive set.
if ( $this->is_prototype() ) {
throw new Exception( 'Attempting property access on prototype presentation. Use Presentation::of( $data ) to get a model presentation.' );
}
$generator = "generate_$name";
if ( \method_exists( $this, $generator ) ) {
$this->{$name} = $this->$generator();
return $this->{$name};
}
throw new Exception( "Property $name has no generator. Expected function $generator." );
}
* Gets the raw value of a presentation.
*
* @return array The raw value.
*/
public function get() {
return $this->presentation->robots;
}
}
protected function get_robots_value() {
$context = $this->context_memoizer->for_current_page();
$robots_presenter = new Robots_Presenter();
$robots_presenter->presentation = $context->presentation;
return $this->format_robots( $robots_presenter->get() );
}
/**
* Formats our robots fields, to match the pattern WordPress is using.
*
public function add_robots( $robots ) {
if ( ! \is_array( $robots ) ) {
return $this->get_robots_value();
}
$merged_robots = \array_merge( $robots, $this->get_robots_value() );
$filtered_robots = $this->enforce_robots_congruence( $merged_robots );
$sorted_robots = $this->sort_robots( $filtered_robots );
// Filter all falsy-null robot values.
return \array_filter( $sorted_robots );
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
}
// 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 array $robots Associative array of directives. Every key must be the name of the directive, and the
* corresponding value must either be a string to provide as value for the directive or a
* boolean `true` if it is a boolean directive, i.e. without a value.
*/
$robots = apply_filters( 'wp_robots', array() );
$robots_strings = array();
foreach ( $robots as $directive => $value ) {
if ( is_string( $value ) ) {
// If a string value, include it as value for the directive.
// Avoid the array_slice() if possible.
if ( 0 == $the_['accepted_args'] ) {
$value = call_user_func( $the_['function'] );
} elseif ( $the_['accepted_args'] >= $num_args ) {
$value = call_user_func_array( $the_['function'], $args );
} else {
$value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int) $the_['accepted_args'] ) );
}
}
} while ( false !== next( $this->iterations[ $nesting_level ] ) );
*
* @param array $args Parameters to pass to the callback functions.
*/
public function do_action( $args ) {
$this->doing_action = true;
$this->apply_filters( '', $args );
// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
if ( ! $this->nesting_level ) {
$this->doing_action = false;
}
} elseif ( is_array( $arg[0] ) && 1 === count( $arg[0] ) && isset( $arg[0][0] ) && is_object( $arg[0][0] ) ) {
// Backward compatibility for PHP4-style passing of `array( &$this )` as action `$arg`.
$arg[0] = $arg[0][0];
}
$wp_filter[ $hook_name ]->do_action( $arg );
array_pop( $wp_current_filter );
}
/**
/**
* Prints scripts or data in the head tag on the front end.
*
* @since 1.5.0
*/
do_action( 'wp_head' );
}
/**
* Fires the wp_footer action.
*
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<?php wp_head(); ?>
<link rel="shortcut icon" href="/app/themes/ywd-selfsignal/dist/images/favicon.ico" type="image/x-icon">
<link rel="icon" href="/app/themes/ywd-selfsignal/dist/images/favicon.ico" type="image/x-icon">
<!-- Start of Google Analytics -->
<script>
do_action( 'wp_before_load_template', $_template_file, $load_once, $args );
if ( $load_once ) {
require_once $_template_file;
} else {
require $_template_file;
}
/**
* Fires after a template file is loaded.
*
break;
}
}
if ( $load && '' !== $located ) {
load_template( $located, $load_once, $args );
}
return $located;
}
* @param string[] $templates Array of template files to search for, in order.
* @param array $args Additional arguments passed to the template.
*/
do_action( 'get_template_part', $slug, $name, $templates, $args );
if ( ! locate_template( $templates, true, false, $args ) ) {
return false;
}
}
/**
?>
<!doctype html>
<html <?php language_attributes(); ?>>
<?php get_template_part('templates/head'); ?>
<body <?php body_class(); ?>>
<!--[if IE]>
<div class="alert alert-warning">
<?php _e('You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.', 'sage'); ?>
</div>
*
* @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';
}
<?php
/**
* WordPress View Bootstrapper
*/
define('WP_USE_THEMES', true);
require __DIR__ . '/wp/wp-blog-header.php';
ErrorException
|
---|
ErrorException: Attempt to read property "taxonomy" on null at /home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/presentations/indexable-term-archive-presentation.php:163 at Illuminate\Foundation\Bootstrap\HandleExceptions->handleError(2, 'Attempt to read property "taxonomy" on null', '/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/presentations/indexable-term-archive-presentation.php', 163, array()) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/themes/selfsignal-theme/vendor/roots/acorn/src/Roots/Acorn/Bootstrap/HandleExceptions.php:49) at Roots\Acorn\Bootstrap\HandleExceptions->handleError(2, 'Attempt to read property "taxonomy" on null', '/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/presentations/indexable-term-archive-presentation.php', 163) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/presentations/indexable-term-archive-presentation.php:163) at Yoast\WP\SEO\Presentations\Indexable_Term_Archive_Presentation->generate_robots() (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/presentations/abstract-presentation.php:66) at Yoast\WP\SEO\Presentations\Abstract_Presentation->__get('robots') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/presenters/robots-presenter.php:38) at Yoast\WP\SEO\Presenters\Robots_Presenter->get() (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/integrations/front-end/wp-robots-integration.php:91) at Yoast\WP\SEO\Integrations\Front_End\WP_Robots_Integration->get_robots_value() (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/plugins/wordpress-seo/src/integrations/front-end/wp-robots-integration.php:73) at Yoast\WP\SEO\Integrations\Front_End\WP_Robots_Integration->add_robots(array('noindex' => true, 'nofollow' => true)) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/class-wp-hook.php:308) at WP_Hook->apply_filters(array('noindex' => true, 'nofollow' => true), array(array('noindex' => true, 'nofollow' => true))) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/plugin.php:205) at apply_filters('wp_robots', array()) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/robots-template.php:32) at wp_robots('') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/class-wp-hook.php:308) at WP_Hook->apply_filters(null, array('')) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/class-wp-hook.php:332) at WP_Hook->do_action(array('')) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/plugin.php:517) at do_action('wp_head') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/general-template.php:3049) at wp_head() (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/themes/selfsignal-theme/templates/head.php:5) at require('/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/themes/selfsignal-theme/templates/head.php') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/template.php:785) at load_template('/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/themes/selfsignal-theme/templates/head.php', false, array()) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/template.php:718) at locate_template(array('templates/head.php'), true, false, array()) (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/general-template.php:204) at get_template_part('templates/head') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/themes/selfsignal-theme/base.php:9) at include('/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/app/themes/selfsignal-theme/base.php') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/template-loader.php:106) at require_once('/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-includes/template-loader.php') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-blog-header.php:19) at require('/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/wp/wp-blog-header.php') (/home/clients/a580e96245eda33f45e7f36541a86a51/sites/www.selfsignal.fr/releases/6/web/index.php:6) |