split_shared_term
Fires after a previously shared taxonomy term is split into two separate terms.
Usage
add_action( 'split_shared_term', 'wp_kama_split_shared_term_action', 10, 4 ); /** * Function for `split_shared_term` action-hook. * * @param int $term_id ID of the formerly shared term. * @param int $new_term_id ID of the new term created for the $term_taxonomy_id. * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split. * @param string $taxonomy Taxonomy for the split term. * * @return void */ function wp_kama_split_shared_term_action( $term_id, $new_term_id, $term_taxonomy_id, $taxonomy ){ // action... }
- $term_id(int)
- ID of the formerly shared term.
- $new_term_id(int)
- ID of the new term created for the $term_taxonomy_id.
- $term_taxonomy_id(int)
- ID for the term_taxonomy row affected by the split.
- $taxonomy(string)
- Taxonomy for the split term.
Changelog
Since 4.2.0 | Introduced. |
Where the hook is called
split_shared_term
wp-includes/taxonomy.php 4355
do_action( 'split_shared_term', $term_id, $new_term_id, $term_taxonomy_id, $term_taxonomy->taxonomy );
Where the hook is used in WordPress
wp-includes/default-filters.php 494
add_action( 'split_shared_term', '_wp_check_split_default_terms', 10, 4 );
wp-includes/default-filters.php 495
add_action( 'split_shared_term', '_wp_check_split_terms_in_menus', 10, 4 );
wp-includes/default-filters.php 496
add_action( 'split_shared_term', '_wp_check_split_nav_menu_terms', 10, 4 );