Yoast\WP\SEO\Helpers

Robots_Helper::is_indexable()publicYoast 1.0

Retrieves whether the Indexable is indexable.

{} Это метод класса: Robots_Helper{}

Хуков нет.

Возвращает

true|false. Whether the Indexable is indexable.

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

$Robots_Helper = new Robots_Helper();
$Robots_Helper->is_indexable( $indexable );
$indexable(Indexable) (обязательный)
The Indexable.

Код Robots_Helper::is_indexable() Yoast 19.7.1

public function is_indexable( Indexable $indexable ) {
	if ( $indexable->is_robots_noindex === null ) {
		// No individual value set, check the global setting.
		switch ( $indexable->object_type ) {
			case 'post':
				return $this->post_type_helper->is_indexable( $indexable->object_sub_type );
			case 'term':
				return $this->taxonomy_helper->is_indexable( $indexable->object_sub_type );
		}
	}

	return $indexable->is_robots_noindex === false;
}