wp_get_split_terms

Get data about terms that previously shared a single term_id, but have since been split.

Description

(array) wp_get_split_terms( (int) $old_term_id ); 

Returns (array)

Array of new term IDs, keyed by taxonomy.

Parameters (1)

0. $old_term_id (int)
Term ID. This is the old, pre-split term ID.

Usage

  1. if ( !function_exists( 'wp_get_split_terms' ) ) { 
  2. require_once ABSPATH . WPINC . '/taxonomy.php'; 
  3.  
  4. // Term ID. This is the old, pre-split term ID. 
  5. $old_term_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wp_get_split_terms($old_term_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/taxonomy.php  
  1. function wp_get_split_terms( $old_term_id ) { 
  2. $split_terms = get_option( '_split_terms', array() ); 
  3.  
  4. $terms = array(); 
  5. if ( isset( $split_terms[ $old_term_id ] ) ) { 
  6. $terms = $split_terms[ $old_term_id ]; 
  7.  
  8. return $terms;