Yoast\WP\SEO\Generators\Schema

Breadcrumb::is_needed │ public │ Yoast 1.0

Determine if we should add a breadcrumb attribute.

Метод класса: Breadcrumb{}

Хуков нет.

Возвращает

bool.

Использование

$Breadcrumb = new Breadcrumb();
$Breadcrumb->is_needed();

Код Breadcrumb::is_needed() Yoast 28.9

public function is_needed() {
	if ( $this->context->indexable->object_type === 'unknown' ) {
		return false;
	}

	if ( $this->context->indexable->object_type === 'system-page' && $this->context->indexable->object_sub_type === '404' ) {
		return false;
	}

	return true;
}