Yoast\WP\SEO\Generators\Schema
Author::is_needed()
Determine whether we should return Person schema.
Метод класса: Author{}
Хуков нет.
Возвращает
true|false
.
Использование
$Author = new Author(); $Author->is_needed();
Код Author::is_needed() Author::is needed Yoast 24.1
public function is_needed() { if ( $this->context->indexable->object_type === 'user' ) { return true; } if ( $this->context->indexable->object_type === 'post' && $this->helpers->schema->article->is_author_supported( $this->context->indexable->object_sub_type ) && $this->context->schema_article_type !== 'None' ) { return true; } return false; }