Yoast\WP\SEO\Task_List\Application\Tasks

Improve_Content_Readability::populate_child_taskspublicYoast 1.0

Populates the child tasks by querying content modified in the last two months.

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

Хуков нет.

Возвращает

Child_Task_Interface[].

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

$Improve_Content_Readability = new Improve_Content_Readability();
$Improve_Content_Readability->populate_child_tasks(): array;

Код Improve_Content_Readability::populate_child_tasks() Yoast 27.7

public function populate_child_tasks(): array {
	$post_type = $this->get_post_type();

	if ( empty( $post_type ) ) {
		return [];
	}

	$two_months_ago = $this->get_recency_timestamp();

	$recent_content_items = $this->recent_content_indexable_collector->get_recent_content_with_readability_scores(
		$post_type,
		$two_months_ago,
		self::DEFAULT_LIMIT,
	);

	$child_tasks = [];
	foreach ( $recent_content_items as $content_item_score_data ) {
		$child_tasks[] = new Improve_Content_Readability_Child(
			$this,
			$content_item_score_data,
		);
	}

	return $child_tasks;
}