Yoast\WP\SEO\Surfaces
Meta_Surface::for_post_type_archive()
Returns the meta tags context for a post type archive.
Метод класса: Meta_Surface{}
Хуков нет.
Возвращает
Meta|false
. The meta values. False if none could be found.
Использование
$Meta_Surface = new Meta_Surface(); $Meta_Surface->for_post_type_archive( $post_type );
- $post_type(строка|null)
- The post type to get the archive meta for.
По умолчанию: current post type
Код Meta_Surface::for_post_type_archive() Meta Surface::for post type archive Yoast 24.4
public function for_post_type_archive( $post_type = null ) { if ( $post_type === null ) { $post_type = \get_post_type(); } $indexable = $this->repository->find_for_post_type_archive( $post_type ); if ( ! $indexable ) { return false; } return $this->build_meta( $this->context_memoizer->get( $indexable, 'Post_Type_Archive' ) ); }