wppaste
WordPress

wp_get_split_term( int $old_term_id, string $taxonomy ): int|false

Since
4.2.0
Source
wp-includes/taxonomy.php:4618
Gets the new term ID corresponding to a previously split term.

Parameters

$old_term_idint
Term ID. This is the old, pre-split term ID.
$taxonomystring
Taxonomy that the term belongs to.

Return

int|false
If a previously split term is found corresponding to the old term_id and taxonomy, the new term_id will be returned. If no previously split term is found matching the parameters, returns false.

Uses · 1

  • wp_get_split_terms()Gets data about terms that previously shared a single term_id, but have since been split.

Source

function wp_get_split_term( $old_term_id, $taxonomy ) {	$split_terms = wp_get_split_terms( $old_term_id ); 	$term_id = false;	if ( isset( $split_terms[ $taxonomy ] ) ) {		$term_id = (int) $split_terms[ $taxonomy ];	} 	return $term_id;}

History

Introduced in 4.2.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, from src/wp-includes/taxonomy.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.