Yoast\WP\SEO\Helpers

Current_Page_Helper::current_post_is_privacy_policy()publicYoast 1.0

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() Yoast 19.2

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 ) );
}