Yoast\WP\SEO\Surfaces
Meta_Surface::for_posts_page
Returns the meta tags context for the posts page.
Метод класса: Meta_Surface{}
Хуков нет.
Возвращает
Meta|false. The meta values. False if none could be found.
Использование
$Meta_Surface = new Meta_Surface(); $Meta_Surface->for_posts_page();
Код Meta_Surface::for_posts_page() Meta Surface::for posts page Yoast 28.6
public function for_posts_page() {
$posts_page_id = (int) \get_option( 'page_for_posts' );
if ( $posts_page_id !== 0 ) {
$indexable = $this->repository->find_by_id_and_type( $posts_page_id, 'post' );
if ( ! $indexable ) {
return false;
}
return $this->build_meta( $this->context_memoizer->get( $indexable, 'Static_Posts_Page' ) );
}
$indexable = $this->repository->find_for_home_page();
if ( ! $indexable ) {
return false;
}
return $this->build_meta( $this->context_memoizer->get( $indexable, 'Home_Page' ) );
}