Yoast\WP\SEO\Builders

Primary_Term_Builder::build()publicYoast 1.0

Formats and saves the primary terms for the post with the given post id.

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

Хуков нет.

Возвращает

null. Ничего.

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

$Primary_Term_Builder = new Primary_Term_Builder();
$Primary_Term_Builder->build( $post_id );
$post_id(int) (обязательный)
The post ID.

Код Primary_Term_Builder::build() Yoast 19.7.1

public function build( $post_id ) {
	foreach ( $this->primary_term->get_primary_term_taxonomies( $post_id ) as $taxonomy ) {
		$this->save_primary_term( $post_id, $taxonomy->name );
	}
}