acf_form_taxonomy::save_term
save_term
description
Method of the class: acf_form_taxonomy{}
No Hooks.
Returns
$post_id. (int)
Usage
$acf_form_taxonomy = new acf_form_taxonomy(); $acf_form_taxonomy->save_term( $term_id, $tt_id, $taxonomy );
- $term_id(required)
- .
- $tt_id(required)
- .
- $taxonomy(required)
- .
Changelog
| Since 5.0.0 | Introduced. |
acf_form_taxonomy::save_term() acf form taxonomy::save term code ACF 6.0.4
function save_term( $term_id, $tt_id, $taxonomy ) {
// vars
$post_id = 'term_' . $term_id;
// verify and remove nonce
if ( ! acf_verify_nonce( 'taxonomy' ) ) {
return $term_id;
}
// valied and show errors
acf_validate_save_post( true );
// save
acf_save_post( $post_id );
}