post_comments_feed_link
函数
post_comments_feed_link ( $link_text = '', $post_id = '', $feed = '' )
- 参数
-
-
(string)
$link_text
Optional. Descriptive link text. Default ‘Comments Feed’.- Required: 否
- Default: (empty)
-
(int)
$post_id
Optional. Post ID. Default is the ID of the global `$post`.- Required: 否
- Default: (empty)
-
(string)
$feed
Optional. Feed type. Possible values include ‘rss2’, ‘atom’. Default is the value of get_default_feed().- Required: 否
- Default: (empty)
-
(string)
- 定义位置
-
-
wp-includes/link-template.php
, line 833
-
wp-includes/link-template.php
- 引入
- 2.5.0
- 弃用
- –
Displays the comment feed link for a post.
Prints out the comment feed link for a post. Link text is placed in the
anchor. If no link text is specified, default text is used. If no post ID is
specified, the current post is used.
function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) { $url = get_post_comments_feed_link( $post_id, $feed ); if ( empty( $link_text ) ) { $link_text = __( 'Comments Feed' ); } $link = '' . $link_text . ''; /** * Filters the post comment feed link anchor tag. * * @since 2.8.0 * * @param string $link The complete anchor tag for the comment feed link. * @param int $post_id Post ID. * @param string $feed The feed type. Possible values include 'rss2', 'atom', * or an empty string for the default feed type. */ echo apply_filters( 'post_comments_feed_link_html', $link, $post_id, $feed ); }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。