Yoast\WP\SEO\AI\Content_Planner\Infrastructure\Recent_Content

Recent_Content_Collector::collect_about_pagepublicYoast 1.0

Collects the most recent indexed about page.

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

Хуков нет.

Возвращает

Массив<Строку>|false. The about page needed information.

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

$Recent_Content_Collector = new Recent_Content_Collector();
$Recent_Content_Collector->collect_about_page( $post_type );
$post_type(строка) (обязательный)
The post type to collect.

Код Recent_Content_Collector::collect_about_page() Yoast 27.8

public function collect_about_page( string $post_type ) {
	$indexable = $this->indexable_repository->get_most_recent_about_page( $post_type );

	if ( $indexable ) {
		return [
			'title'       => ( $indexable->breadcrumb_title ?? '' ),
			'description' => ( $indexable->description ?? '' ),
		];
	}

	return false;
}