split_shared_term
Action HookDescription
Fires after a previously shared taxonomy term is split into two separate terms.Hook Information
File Location |
wp-includes/taxonomy.php
View on GitHub
|
Hook Type | Action |
Line Number | 4367 |
Hook Parameters
Type | Name | Description |
---|---|---|
int
|
$term_id
|
ID of the formerly shared term. |
int
|
$new_term_id
|
ID of the new term created for the $term_taxonomy_id. |
int
|
$term_taxonomy_id
|
ID for the term_taxonomy row affected by the split. |
string
|
$taxonomy
|
Taxonomy for the split term. |
Usage Examples
Basic Usage
<?php
// Hook into split_shared_term
add_action('split_shared_term', 'my_custom_function', 10, 4);
function my_custom_function($term_id, $new_term_id, $term_taxonomy_id, $taxonomy) {
// Your custom code here
}
Source Code Context
wp-includes/taxonomy.php:4367
- How this hook is used in WordPress core
<?php
4362 * @param int $term_id ID of the formerly shared term.
4363 * @param int $new_term_id ID of the new term created for the $term_taxonomy_id.
4364 * @param int $term_taxonomy_id ID for the term_taxonomy row affected by the split.
4365 * @param string $taxonomy Taxonomy for the split term.
4366 */
4367 do_action( 'split_shared_term', $term_id, $new_term_id, $term_taxonomy_id, $term_taxonomy->taxonomy );
4368
4369 return $new_term_id;
4370 }
4371
4372 /**
PHP Documentation
<?php
/**
* Fires after a previously shared taxonomy term is split into two separate terms.
*
* @since 4.2.0
*
* @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.
*/
Quick Info
- Hook Type: Action
- Parameters: 4
- File: wp-includes/taxonomy.php
Related Hooks
Related hooks will be displayed here in future updates.