Yoast\WP\SEO\Builders

Indexable_Builder::build_for_post_type_archive()publicYoast 1.0

Creates an indexable for a post type archive.

{} Это метод класса: Indexable_Builder{}

Хуков нет.

Возвращает

Indexable. The post type archive indexable.

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

$Indexable_Builder = new Indexable_Builder();
$Indexable_Builder->build_for_post_type_archive( $post_type, $indexable );
$post_type(строка) (обязательный)
The post type.
$indexable(Indexable|true|false)
An existing indexable to overwrite.
По умолчанию: false

Код Indexable_Builder::build_for_post_type_archive() Yoast 19.10

public function build_for_post_type_archive( $post_type, $indexable = false ) {
	$defaults = [
		'object_type'     => 'post-type-archive',
		'object_sub_type' => $post_type,
	];
	return $this->build( $indexable, $defaults );
}