get_comment_link

過濾鉤子
apply_filters( 'get_comment_link', $link, $comment, $args, $cpage )
引數
  • (string) $link The comment permalink with '#comment-$id' appended.
    Required:
  • (WP_Comment) $comment The current comment object.
    Required:
  • (array) $args An array of arguments to override the defaults.
    Required:
  • (int) $cpage The calculated 'cpage' value.
    Required:
定義位置
相關勾子
get_comments_linkedit_comment_linkget_comment_idget_edit_comment_linkcomment_link
相關方法
get_comment_linkget_comments_linkedit_comment_linknext_comments_linkget_comment_idget_edit_comment_link
引入
4.4.0
棄用
-

get_comment_link函式返回一個給定評論的固定URL。它接受一個評論物件作為引數,並返回一個連結到網站上該評論的單獨頁面的URL。

過濾返回的單個註釋固定連結。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
return apply_filters( 'get_comment_link', $link, $comment, $args, $cpage );
return apply_filters( 'get_comment_link', $link, $comment, $args, $cpage );
return apply_filters( 'get_comment_link', $link, $comment, $args, $cpage );

常見問題

FAQs
檢視更多 >