WPSEO_Primary_Term_Admin::add_input_fields()publicYoast 1.0

Adds hidden fields for primary taxonomies.

Метод класса: WPSEO_Primary_Term_Admin{}

Хуков нет.

Возвращает

Строку. The HTML content.

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

$WPSEO_Primary_Term_Admin = new WPSEO_Primary_Term_Admin();
$WPSEO_Primary_Term_Admin->add_input_fields( $content );
$content(строка) (обязательный)
The metabox content.

Код WPSEO_Primary_Term_Admin::add_input_fields() Yoast 19.11

public function add_input_fields( $content ) {
	$taxonomies = $this->get_primary_term_taxonomies();

	foreach ( $taxonomies as $taxonomy ) {
		$content .= $this->primary_term_field( $taxonomy->name );
		$content .= wp_nonce_field( 'save-primary-term', WPSEO_Meta::$form_prefix . 'primary_' . $taxonomy->name . '_nonce', false, false );
	}
	return $content;
}