Yoast\WP\SEO\Repositories
Indexable_Cleanup_Repository::count_indexables_with_object_type_and_object_sub_type()
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() 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(); }