Yoast\WP\SEO\Actions\Indexables
Indexable_Head_Action::is_front_page_readable
Checks if the current user is allowed to read the static front page, if one is set.
Метод класса: Indexable_Head_Action{}
Хуков нет.
Возвращает
bool. Whether the front page is readable by the current user.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->is_front_page_readable();
Код Indexable_Head_Action::is_front_page_readable() Indexable Head Action::is front page readable Yoast 28.9
protected function is_front_page_readable() {
$front_page_id = (int) \get_option( 'page_on_front' );
if ( \get_option( 'show_on_front' ) !== 'page' || $front_page_id === 0 ) {
return true;
}
return $this->meta_surface->is_post_readable( $front_page_id );
}