Yoast\WP\SEO\Helpers
Current_Page_Helper::is_404()
Determine whether this is a 404 page.
Метод класса: Current_Page_Helper{}
Хуков нет.
Возвращает
true|false
. Whether nor not the current page is a 404 page.
Использование
$Current_Page_Helper = new Current_Page_Helper(); $Current_Page_Helper->is_404();
Код Current_Page_Helper::is_404() Current Page Helper::is 404 Yoast 23.4
public function is_404() { $wp_query = $this->wp_query_wrapper->get_main_query(); return $wp_query->is_404(); }