wp_get_split_terms

The timeline below displays how wordpress function wp_get_split_terms has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Gets data about terms that previously shared a single term_id, but have since been split.
 *
 * @since 4.2.0
 *
 * @param int $old_term_id Term ID. This is the old, pre-split term ID.
 * @return array Array of new term IDs, keyed by taxonomy.
 */
function wp_get_split_terms($old_term_id)
{
    $split_terms = get_option('_split_terms', array());
    $terms = array();
    if (isset($split_terms[$old_term_id])) {
        $terms = $split_terms[$old_term_id];
    }
    return $terms;
}

WordPress Version: 4.2

/**
 * Get data about terms that previously shared a single term_id, but have since been split.
 *
 * @since 4.2.0
 *
 * @param int $old_term_id Term ID. This is the old, pre-split term ID.
 * @return array Array of new term IDs, keyed by taxonomy.
 */
function wp_get_split_terms($old_term_id)
{
    $split_terms = get_option('_split_terms', array());
    $terms = array();
    if (isset($split_terms[$old_term_id])) {
        $terms = $split_terms[$old_term_id];
    }
    return $terms;
}