get_comments_link

過濾鉤子
apply_filters( 'get_comments_link', $comments_link, $post )
引數
  • (string) $comments_link Post comments permalink with '#comments' appended.
    Required:
  • (int|WP_Post) $post Post ID or WP_Post object.
    Required:
定義位置
相關勾子
get_comment_linkedit_comment_linkpost_comments_linkget_edit_comment_linkget_comment_id
相關方法
get_comments_linkget_comment_linknext_comments_linkedit_comment_linkcomments_linkget_next_comments_link
引入
3.6.0
棄用
-

get_comments_link: 這個函式檢索當前文章的評論源的URL: 該函式不接受任何引數,並返回一個代表URL的字串。

過濾返回的文章評論的固定位置。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_comments_link', $comments_link, $post );
return apply_filters( 'get_comments_link', $comments_link, $post );
return apply_filters( 'get_comments_link', $comments_link, $post );

常見問題

FAQs
檢視更多 >