Yoast\WP\SEO\Actions\Indexables

Indexable_Head_Action::for_posts_page │ public │ Yoast 1.0

Retrieves the head for the posts page.

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

Хуков нет.

Возвращает

object. Object with head and status properties.

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

$Indexable_Head_Action = new Indexable_Head_Action();
$Indexable_Head_Action->for_posts_page();

Код Indexable_Head_Action::for_posts_page() Yoast 28.9

public function for_posts_page() {
	$posts_page_id = (int) \get_option( 'page_for_posts' );
	if ( $posts_page_id !== 0 && ! $this->meta_surface->is_post_readable( $posts_page_id ) ) {
		return $this->for_404();
	}

	return $this->with_404_fallback( $this->with_cache( 'posts_page' ) );
}