Yoast\WP\SEO\Repositories

Indexable_Repository::find_all_with_type()publicYoast 1.0

Retrieves all the indexable instances of a certain object type.

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

Хуков нет.

Возвращает

Indexable[]. The array with all the indexable instances of a certain object type.

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

$Indexable_Repository = new Indexable_Repository();
$Indexable_Repository->find_all_with_type( $object_type );
$object_type(строка) (обязательный)
The object type.

Код Indexable_Repository::find_all_with_type() Yoast 22.4

public function find_all_with_type( $object_type ) {
	/**
	 * The array with all the indexable instances of a certain object type.
	 *
	 * @var Indexable[] $indexables
	 */
	$indexables = $this
		->query()
		->where( 'object_type', $object_type )
		->find_many();

	return \array_map( [ $this, 'upgrade_indexable' ], $indexables );
}