Yoast\WP\SEO\Builders

Indexable_Post_Type_Archive_Builder::build()publicYoast 1.0

Formats the data.

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

Хуков нет.

Возвращает

Indexable. The extended indexable.

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

$Indexable_Post_Type_Archive_Builder = new Indexable_Post_Type_Archive_Builder();
$Indexable_Post_Type_Archive_Builder->build( $post_type, $indexable );
$post_type(строка) (обязательный)
The post type to build the indexable for.
$indexable(Indexable) (обязательный)
The indexable to format.

Код Indexable_Post_Type_Archive_Builder::build() Yoast 19.10

public function build( $post_type, Indexable $indexable ) {
	$indexable->object_type       = 'post-type-archive';
	$indexable->object_sub_type   = $post_type;
	$indexable->title             = $this->options->get( 'title-ptarchive-' . $post_type );
	$indexable->description       = $this->options->get( 'metadesc-ptarchive-' . $post_type );
	$indexable->breadcrumb_title  = $this->get_breadcrumb_title( $post_type );
	$indexable->permalink         = \get_post_type_archive_link( $post_type );
	$indexable->is_robots_noindex = $this->options->get( 'noindex-ptarchive-' . $post_type );
	$indexable->is_public         = ( (int) $indexable->is_robots_noindex !== 1 );
	$indexable->blog_id           = \get_current_blog_id();
	$indexable->version           = $this->version;

	$timestamps                      = $this->get_object_timestamps( $post_type );
	$indexable->object_published_at  = $timestamps->published_at;
	$indexable->object_last_modified = $timestamps->last_modified;

	return $indexable;
}