pll_save_term

Fires after the term language and translations are saved.

Description

do_action( 'pll_save_term', (int) $term_id, (string) $taxonomy, (array) $this_model_term_get_translations_term_id ); 

Parameters (3)

0. $term_id (int)
The term id.
1. $taxonomy (string)
The taxonomy.
2. $this_model_term_get_translations_term_id (array) => empty( $translations ) ? $this->model->term->get_translations( $term_id ) : $translations
The list of translations term ids

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'pll_save_term', $term_id, $taxonomy, $this_model_term_get_translations_term_id ); 
The following example is for adding a hook callback.
  1. // define the pll_save_term callback 
  2. function action_pll_save_term( $term_id, $taxonomy, $this_model_term_get_translations_term_id ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'pll_save_term', 'action_pll_save_term', 10, 3 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'pll_save_term', 'action_pll_save_term', 10, 3 ); 

Defined (1)

The action is defined in the following location(s).

/admin/admin-filters-term.php  
  1. do_action( 'pll_save_term', $term_id, $taxonomy, empty( $translations ) ? $this->model->term->get_translations( $term_id ) : $translations );