Yoast\WP\SEO\Actions\Indexables
Indexable_Head_Action::with_cache
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() Indexable Head Action::with cache Yoast 27.6
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 ];
}