Yoast\WP\SEO\Abilities\Infrastructure
Post_SEO_Field_Map::indexables_to_arrays
Builds the post SEO data arrays for a set of indexables.
Метод класса: Post_SEO_Field_Map{}
Хуков нет.
Возвращает
Массив
Использование
$Post_SEO_Field_Map = new Post_SEO_Field_Map(); $Post_SEO_Field_Map->indexables_to_arrays( $indexables ): array;
- $indexables(Indexable[]) (обязательный)
- The indexables to read from.
Код Post_SEO_Field_Map::indexables_to_arrays() Post SEO Field Map::indexables to arrays Yoast 28.3
public function indexables_to_arrays( array $indexables ): array {
if ( $indexables !== [] ) {
$object_ids = \array_map(
static function ( $indexable ) {
return (int) $indexable->object_id;
},
$indexables,
);
// Prime the post cache in one query, so each presentation build below reads its post from cache instead of issuing its own query.
\_prime_post_caches( $object_ids, false, false );
}
return \array_map( [ $this, 'to_seo_array' ], $indexables );
}