Add a form on a term add/edit page
public add_term_form ( string $title, string | array $taxonomies, boolean $show_on_add = true, boolean $show_on_edit = true, integer $parent = '' ) | ||
$title | string | |
$taxonomies | string | array | The taxonomies on which to display this form |
$show_on_add | boolean | Whether or not to show the fields on the add term form |
$show_on_edit | boolean | Whether or not to show the fields on the edit term form |
$parent | integer | Only show this field on child terms of this parent term ID |
/** * Set up the request environment values and save the data. * * @param Fieldmanager_Field $field * @param WP_Post $post * @param mixed $values */ public function save_values($field, $term, $values) { $field->add_term_form($field->name, $term->taxonomy)->save_to_term_meta($term->term_id, $term->taxonomy, $values); }