Yoast\WP\SEO\Helpers
Current_Page_Helper::is_yoast_seo_page()
Check if the current opened page is a Yoast SEO page.
Метод класса: Current_Page_Helper{}
Хуков нет.
Возвращает
true|false
. True when current page is a yoast seo plugin page.
Использование
$Current_Page_Helper = new Current_Page_Helper(); $Current_Page_Helper->is_yoast_seo_page();
Код Current_Page_Helper::is_yoast_seo_page() Current Page Helper::is yoast seo page Yoast 22.4
public function is_yoast_seo_page() { // phpcs:ignore WordPress.Security.NonceVerification.Recommended -- Reason: We are not processing form information. if ( isset( $_GET['page'] ) && \is_string( $_GET['page'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended,WordPress.Security.ValidatedSanitizedInput.InputNotSanitized -- Reason: We are not processing form information, We are only using the variable in the strpos function. $current_page = \wp_unslash( $_GET['page'] ); return \strpos( $current_page, 'wpseo_' ) === 0; } return false; }