wp_get_split_terms() WordPress Function

The wp_get_split_terms() function is used to split a string of terms into an array. The function accepts two parameters: the string of terms and the delimiter used to split the string.

wp_get_split_terms( int $old_term_id ) #

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


Parameters

$old_term_id

(int)(Required)Term ID. This is the old, pre-split term ID.


Top ↑

Return

(array) Array of new term IDs, keyed by taxonomy.


Top ↑

Source

File: wp-includes/taxonomy.php

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;
}


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