WPSEO_Meta_Columns::uses_default_indexing()protectedYoast 1.0

Determines whether the given post ID uses the default indexing settings.

Метод класса: WPSEO_Meta_Columns{}

Хуков нет.

Возвращает

true|false. Whether or not the default indexing is being used for the post.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->uses_default_indexing( $post_id );
$post_id(int) (обязательный)
The post ID to check.

Код WPSEO_Meta_Columns::uses_default_indexing() Yoast 22.4

protected function uses_default_indexing( $post_id ) {
	return WPSEO_Meta::get_value( 'meta-robots-noindex', $post_id ) === '0';
}