Yoast\WP\SEO\Repositories

Indexable_Cleanup_Repository::count_indexables_for_authors_archive_disabled()publicYoast 1.0

Counts the amount of author archive indexables if they are not disabled.

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

Хуков нет.

Возвращает

float|int.

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

$Indexable_Cleanup_Repository = new Indexable_Cleanup_Repository();
$Indexable_Cleanup_Repository->count_indexables_for_authors_archive_disabled();

Код Indexable_Cleanup_Repository::count_indexables_for_authors_archive_disabled() Yoast 23.8

public function count_indexables_for_authors_archive_disabled() {
	if ( ! $this->author_archive->are_disabled() ) {
		return 0;
	}

	return $this
		->query()
		->where( 'object_type', 'user' )
		->count();
}