split_shared_term

Fires after a previously shared taxonomy term is split into two separate terms.

Description

do_action( 'split_shared_term', (int) $term_id, (int) $new_term_id, (int) $term_taxonomy_id, (string) $term_taxonomy_taxonomy ); 

Parameters (4)

0. $term_id (int)
ID of the formerly shared term.
1. $new_term_id (int)
ID of the new term created for the $term_taxonomy_id.
2. $term_taxonomy_id (int)
ID for the term_taxonomy row affected by the split.
3. $term_taxonomy_taxonomy (string)
Taxonomy for the split term.

Usage

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

Defined (1)

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

/wp-includes/taxonomy.php  
  1. do_action( 'split_shared_term', $term_id, $new_term_id, $term_taxonomy_id, $term_taxonomy->taxonomy );