comment_author_email_link

函式
comment_author_email_link ( $linktext = '', $before = '', $after = '', $comment = null )
引數
  • (string) $linktext Optional. Text to display instead of the comment author's email address. Default empty.
    Required:
    Default: (empty)
  • (string) $before Optional. Text or HTML to display before the email link. Default empty.
    Required:
    Default: (empty)
  • (string) $after Optional. Text or HTML to display after the email link. Default empty.
    Required:
    Default: (empty)
  • (int|WP_Comment) $comment Optional. Comment ID or WP_Comment object. Default is the current comment.
    Required:
    Default: null
定義位置
相關方法
get_comment_author_email_linkcomment_author_emailcomment_author_url_linkcomment_author_linkget_comment_author_email
引入
0.71
棄用
-

comment_author_email_link: 此函式生成一個指向評論作者的電子郵件地址的連結: 當點選時,它會開啟使用者的預設電子郵件客戶端,並在收件人欄中預先填上電子郵件地址。

顯示給當前評論的作者的HTML電子郵件連結。

應該注意保護電子郵件地址,並確保電子郵件收割者不會捕獲你的評論者的電子郵件地址。大多數人認為他們的電子郵件地址不會以原始形式出現在網站上。這樣做將使任何人,包括那些人們不希望得到的電子郵件地址,並將其用於他們自己的手段,無論好壞。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
$link = get_comment_author_email_link( $linktext, $before, $after, $comment );
if ( $link ) {
echo $link;
}
}
function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) { $link = get_comment_author_email_link( $linktext, $before, $after, $comment ); if ( $link ) { echo $link; } }
function comment_author_email_link( $linktext = '', $before = '', $after = '', $comment = null ) {
	$link = get_comment_author_email_link( $linktext, $before, $after, $comment );
	if ( $link ) {
		echo $link;
	}
}

常見問題

FAQs
檢視更多 >