Yoast\WP\SEO\Surfaces
Meta_Surface::for_indexable()
Returns the meta for an indexable.
Метод класса: Meta_Surface{}
Хуков нет.
Возвращает
Meta|false
. The meta values. False if none could be found.
Использование
$Meta_Surface = new Meta_Surface(); $Meta_Surface->for_indexable( $indexable, $page_type );
- $indexable(Indexable) (обязательный)
- The indexable.
- $page_type(строка|null)
- The page type if already known.
По умолчанию: null
Код Meta_Surface::for_indexable() Meta Surface::for indexable Yoast 22.3
public function for_indexable( $indexable, $page_type = null ) { if ( ! \is_a( $indexable, Indexable::class ) ) { return false; } if ( \is_null( $page_type ) ) { $page_type = $this->indexable_helper->get_page_type_for_indexable( $indexable ); } return $this->build_meta( $this->context_memoizer->get( $indexable, $page_type ) ); }