wpseek.com
WordPress开发者和主题制作者的搜索引擎
get_the_tags › WordPress Function
Since2.3.0
已弃用n/a
› get_the_tags ( $post = 0 )
参数: |
|
返回: |
|
定义在: |
|
文档: |
Retrieves the tags for a post.
源码
function get_the_tags( $post = 0 ) { $terms = get_the_terms( $post, 'post_tag' ); /** * Filters the array of tags for the given post. * * @since 2.3.0 * * @see get_the_terms() * * @param WP_Term[]|false|WP_Error $terms Array of WP_Term objects on success, false if there are no terms * or the post does not exist, WP_Error on failure. */ return apply_filters( 'get_the_tags', $terms ); }