comment_author

過濾鉤子
apply_filters( 'comment_author', $author, $comment->comment_ID )
引數
  • (string) $author The comment author's username.
    Required:
  • (string) $comment_ID The comment ID as a numeric string.
    Required:
定義位置
相關勾子
get_comment_authorcomment_author_rsscomment_urlget_comment_author_ipget_comment_author_url
相關方法
comment_authorcomment_author_ipcomment_author_urlget_comment_authorcomment_author_rsscomment_author_link
引入
4.1.0
棄用
-

comment_author – 這個過濾器鉤子用於修改顯示在評論中的作者名字。評論的ID、作者姓名和評論物件作為引數傳遞給過濾函式。

過濾顯示評論作者的名字。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
echo apply_filters( 'comment_author', $author, $comment->comment_ID );
echo apply_filters( 'comment_author', $author, $comment->comment_ID );
echo apply_filters( 'comment_author', $author, $comment->comment_ID );

常見問題

FAQs
檢視更多 >