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.


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.


Top ↑

Source

File: wp-includes/taxonomy.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
4.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More