Yoast\WP\SEO\Surfaces
Meta_Surface::for_posts() public Yoast 1.0
Returns the meta tags context for a number of posts.
{} Это метод класса: Meta_Surface{}
Хуков нет.
Возвращает
Meta[]/false
. The meta values. False if none could be found.
Использование
$Meta_Surface = new Meta_Surface(); $Meta_Surface->for_posts( $ids );
- $ids(число[]) (обязательный)
- The IDs of the posts.
Код Meta_Surface::for_posts() Meta Surface::for posts Yoast 16.1.1
public function for_posts( $ids ) {
$indexables = $this->repository->find_by_multiple_ids_and_type( $ids, 'post' );
if ( empty( $indexables ) ) {
return false;
}
return \array_map(
function( $indexable ) {
return $this->build_meta( $this->context_memoizer->get( $indexable, 'Post_Type' ) );
},
$indexables
);
}