split_shared_term WordPress Action Hook
The split_shared_term hook is used to split a shared term. This hook is fired when a term is split. The term_id and taxonomy parameters are passed to the hook. The taxonomy parameter is the name of the taxonomy the term is being split for. The hook is used to update the term_taxonomy table. This is necessary because when a term is split, two new terms are created and the term_taxonomy table needs to be updated to reflect this.
do_action( 'split_shared_term', int $term_id , int $new_term_id , int $term_taxonomy_id , string $taxonomy ) #
Fires after a previously shared taxonomy term is split into two separate terms.
Contents
Parameters
- $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.
Source
File: wp-includes/taxonomy.php
Changelog
Version | Description |
---|---|
4.2.0 | Introduced. |