1. 首页
  2. WordPress钩子手册

get_comments_link

apply_filters( ‘get_comments_link’, string $comments_link, int|WP_Post $post_id )

过滤器::过滤返回的post comments permalink。
Filter Hook: Filters the returned post comments permalink.

目录锚点:#参数#源码


参数(Parameters)

参数 类型 说明
$comments_link (string) Post comments permalink并附加“#comments”。
$post_id (int | WP_Post) Post ID或WP_Post对象。

源码(Source)


更新版本 源码位置 使用 被使用
3.6.0 wp-includes/comment-template.php:818 1 0

get_comments_link 为WP2原创文章,链接:https://www.wp2.cn/hook/get_comments_link-2/