Yoast\WP\SEO\Builders

Indexable_Term_Builder::get_noindex_value()protectedYoast 1.0

Converts the meta noindex value to the indexable value.

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

Хуков нет.

Возвращает

true|false|null.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_noindex_value( $meta_value );
$meta_value(строка) (обязательный)
Term meta to base the value on.

Код Indexable_Term_Builder::get_noindex_value() Yoast 22.4

protected function get_noindex_value( $meta_value ) {
	if ( $meta_value === 'noindex' ) {
		return true;
	}

	if ( $meta_value === 'index' ) {
		return false;
	}

	return null;
}