Yoast\WP\SEO\Builders
Primary_Term_Builder::build()
Formats and saves the primary terms for the post with the given post id.
Метод класса: Primary_Term_Builder{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Primary_Term_Builder = new Primary_Term_Builder(); $Primary_Term_Builder->build( $post_id );
- $post_id(int) (обязательный)
- The post ID.
Код Primary_Term_Builder::build() Primary Term Builder::build Yoast 24.3
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 ); } }