Yoast\WP\SEO\Actions\Importing\Aioseo

Aioseo_Posts_Importing_Action::get_limited_unindexed_count()publicYoast 1.0

Returns the limited number of unimported objects.

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

Хуков нет.

Возвращает

int|false. The limited number of unindexed posts. False if the query fails.

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

$Aioseo_Posts_Importing_Action = new Aioseo_Posts_Importing_Action();
$Aioseo_Posts_Importing_Action->get_limited_unindexed_count( $limit );
$limit(int) (обязательный)
The maximum number of unimported objects to be returned.

Код Aioseo_Posts_Importing_Action::get_limited_unindexed_count() Yoast 19.11

public function get_limited_unindexed_count( $limit ) {
	if ( ! $this->aioseo_helper->aioseo_exists() ) {
		return 0;
	}

	$just_detect          = true;
	$indexables_to_create = $this->wpdb->get_col( $this->query( $limit, $just_detect ) );

	$number_of_indexables_to_create = \count( $indexables_to_create );
	$completed                      = $number_of_indexables_to_create === 0;
	$this->set_completed( $completed );

	return $number_of_indexables_to_create;
}