comment_author_email_link

Sponsored Link

mailtoリンクとして、コメント投稿者のメールアドレスを表示します。
もし”ユーザーは名前とメールアドレスを記入する必要があります”がディスカッションのオプション上で有効になっている場合、メールアドレスが必要です。

Sponsored Link

このタグは、ループ、またはコメントループ内でなければなりません。
注意:あなたのサイトからアドレスを取りこむ良い機会を与えるように、メールアドレスを表示する事は推奨されません。

get_comment_author_email_linkの値を取得するのに使用します。

Displays the comment author’s email address, as a mailto link. An email address must be provided if “User must fill out name and email” is enabled under Discussion Options. This tag must be within The Loop, or a comment loop.

Note: Displaying email addresses is not recommended, as it provides spam collection tools the opportunity to cull them from your site.

Use get_comment_author_email_link to retrieve the value.

comment_author_email_linkのテンプレートタグ使用方法

<?php comment_author_email_link('linktext', 'before', 'after'); ?> 

デフォルトの使い方

email:<?php comment_author_email_link(); ?><br />

リンクテキストとスタイリング

コメント投稿者のメールアドレスのリンクをメールアドレスのコメント投稿者のテキスト文字列として表示して、スタイルのリンクの前後に矢印を追加します。

Displays comment author’s email link as text string Email Comment Author and adds arrows before and after the link to style it.

<?php comment_author_email_link('Email Comment Author', ' > ', '<'); ?>

> Email Comment Author <

comment_author_email_linkのパラメーター

linktext

(string)Eメールリンクのリンクテキスト。デフォルトではコメントの投稿者のメールアドレスです。

(string) Link text for the email link. Default is the comment author’s email address.

before

(string) リンクの前に表示するテキストです。デフォルトはありません。

(string) Text to display before the link. There is no default.

after

(string) リンクの後に表示するテキストです。デフォルトはありません。

(string) Text to display after the link. There is no default.

関連テンプレートタグ

comments_number, comments_link, comments_rss_link, comments_popup_script, comments_popup_link, comment_ID, comment_author, comment_author_IP, comment_author_email, comment_author_url, comment_author_email_link, comment_author_url_link, comment_author_link, comment_type, comment_text, comment_excerpt, comment_date, comment_time, comment_author_rss, comment_text_rss, permalink_comments_rss, wp_list_comments, comment_reply_link, cancel_comment_reply_link, comment_form_title, comment_id_fields, previous_comments_link, next_comments_link, paginate_comments_links

Sponsored Link