wp_get_split_term
函数
wp_get_split_term ( $old_term_id, $taxonomy )
- 参数
-
-
(int)
$old_term_id
Term ID. This is the old, pre-split term ID.- Required: 是
-
(string)
$taxonomy
Taxonomy that the term belongs to.- Required: 是
-
(int)
- 返回值
-
- (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.
- 定义位置
-
-
wp-includes/taxonomy.php
, line 4506
-
wp-includes/taxonomy.php
- 引入
- 4.2.0
- 弃用
- –
获取与之前拆分的术语对应的新术语ID。
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; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。