Yoast\WP\SEO\Helpers
Current_Page_Helper::current_post_is_privacy_policy()
Checks if the current global post is the privacy policy page.
Метод класса: Current_Page_Helper{}
Хуков нет.
Возвращает
true|false
. current global post is set as privacy page
Использование
$Current_Page_Helper = new Current_Page_Helper(); $Current_Page_Helper->current_post_is_privacy_policy();
Код Current_Page_Helper::current_post_is_privacy_policy() Current Page Helper::current post is privacy policy Yoast 22.4
public function current_post_is_privacy_policy() { global $post; if ( ! isset( $post->ID ) ) { return false; } return \intval( $post->ID ) === \intval( \get_option( 'wp_page_for_privacy_policy', false ) ); }