Yoast\WP\SEO\Actions\Indexables

Indexable_Head_Action::with_cache()protectedYoast 1.0

Retrieves a value from the meta surface cached.

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

Хуков нет.

Возвращает

Meta. The meta object.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->with_cache( $type, $argument );
$type(строка) (обязательный)
The type of value to retrieve.
$argument(строка)
The argument for the value.
По умолчанию: ''

Код Indexable_Head_Action::with_cache() Yoast 22.4

protected function with_cache( $type, $argument = '' ) {
	if ( ! isset( $this->cache[ $type ][ $argument ] ) ) {
		$this->cache[ $type ][ $argument ] = \call_user_func( [ $this->meta_surface, "for_$type" ], $argument );
	}

	return $this->cache[ $type ][ $argument ];
}