WPSEO_Primary_Term::set_primary_term()publicYoast 1.0

Sets the new primary term ID.

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

Хуков нет.

Возвращает

null. Ничего.

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

$WPSEO_Primary_Term = new WPSEO_Primary_Term();
$WPSEO_Primary_Term->set_primary_term( $new_primary_term );
$new_primary_term(int) (обязательный)
New primary term ID.

Код WPSEO_Primary_Term::set_primary_term() Yoast 19.6.1

public function set_primary_term( $new_primary_term ) {
	update_post_meta( $this->post_ID, WPSEO_Meta::$meta_prefix . 'primary_' . $this->taxonomy_name, $new_primary_term );
}