post_comments_feed_link
apply_filters( ‘post_comments_feed_link’, string $url )…
apply_filters( ‘post_comments_feed_link’, string $url )
过滤器::过滤post comments feed permalink。
Filter Hook: Filters the post comments feed permalink.
目录锚点:#参数#源码
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $url | (string) | 发布评论feed permalink。 |
源码(Source)
/**
* Display 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.
*
* @since 2.5.0
*
* @param string $link_text Descriptive text.
* @param int $post_id Optional post ID. Default to current post.
* @param string $feed Optional. Feed format.
*/
function post_comments_feed_link( $link_text = '', $post_id = '', $feed = '' ) {
$url = esc_url( get_post_comments_feed_link( $post_id, $feed ) );
if ( empty($link_text) )
$link_text = __('Comments Feed');
/**
* Filter 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, or an empty string for the default feed type.
*/
echo apply_filters( 'post_comments_feed_link_html', "$link_text", $post_id, $feed );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.5.1 | wp-includes/link-template.php:739 | 1 | 0 |
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。

还没有任何评论,赶紧来占个楼吧!