wpseek.com
WordPress开发者和主题制作者的搜索引擎
term_description › WordPress Function
Since2.8.0
已弃用n/a
› term_description ( $term = 0, $deprecated = null )
| 参数: (2) |
|
| 返回: |
|
| 定义在: |
|
| 文档: | |
| Change Log: |
|
Retrieves term description.
Related Functions: tag_description, category_description, the_author_description, the_archive_description, wp_sidebar_description
源码
function term_description( $term = 0, $deprecated = null ) {
if ( ! $term && ( is_tax() || is_tag() || is_category() ) ) {
$term = get_queried_object();
if ( $term ) {
$term = $term->term_id;
}
}
$description = get_term_field( 'description', $term );
return is_wp_error( $description ) ? '' : $description;
}