wpseek.com
WordPress开发者和主题制作者的搜索引擎



wp_get_split_term › WordPress Function

Since4.2.0
已弃用n/a
wp_get_split_term ( $old_term_id, $taxonomy )
参数: (2)
  • (int) $old_term_id Term ID. This is the old, pre-split term ID.
    Required: Yes
  • (string) $taxonomy Taxonomy that the term belongs to.
    Required: Yes
返回:
  • (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.
定义在:
文档:

Gets the new term ID corresponding to a previously split term.



源码

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