Yoast\WP\SEO\Repositories

Indexable_Cleanup_Repository::count_indexables_with_object_type_and_object_sub_type()publicYoast 1.0

Counts amount of indexables by object type and object sub type.

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

Хуков нет.

Возвращает

float|int.

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

$Indexable_Cleanup_Repository = new Indexable_Cleanup_Repository();
$Indexable_Cleanup_Repository->count_indexables_with_object_type_and_object_sub_type( $object_type, $object_sub_type );
$object_type(строка) (обязательный)
The object type to check.
$object_sub_type(строка) (обязательный)
The object sub type to check.

Код Indexable_Cleanup_Repository::count_indexables_with_object_type_and_object_sub_type() Yoast 23.4

public function count_indexables_with_object_type_and_object_sub_type( string $object_type, string $object_sub_type ) {
	return $this
		->query()
		->where( 'object_type', $object_type )
		->where( 'object_sub_type', $object_sub_type )
		->count();
}