edit_comment_link

Sponsored Link

ユーザーがログインして、コメントを編集する権限がある場合、現在のコメントを編集する為のリンクを表示します。ループ内、コメントループ内にある必要があります。

get_edit_comment_linkは、URLを取得するために使用します。

Sponsored Link

Displays a link to edit the current comment, if the user is logged in and allowed to edit the comment. It must be within The Loop, and within a comment loop.

Use get_edit_comment_link to retrieve the url.

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

<?php edit_comment_link( $link, $before, $after ); ?> 

edit_comment_linkのパラメーター

link

(string) (optional)リンクテキストです。

(string) (optional) The link text.

Default: __(‘Edit This’)

before

(string) (optional) リンクテキストの前に配置するテキストです。

(string) (optional) Text to put before the link text.

Default: None

after

(string) (optional) リンクテキストの後に配置するテキストです。

(string) (optional) Text to put after the link text.

Default: None

デフォルトの使い方

デフォルトを使用して、コメントを編集するリンクを表示します。

Displays edit comment link using defaults.

<?php edit_comment_link(); ?>

パラグラフタグ内にコメントを編集を表示する方法

パラグラフタグ内に、”edit comment”のリンクテキストで、コメントを編集するリンクを表示します。

Displays edit comment link, with link text “edit comment”, in a paragraph (

) tag.

<?php edit_comment_link('edit comment', '<p>', '</p>'); ?>

フィルター

apply_filters()は、著者メールに’edit_comment_link’ハックを呼び出します。

apply_filters() Calls ‘edit_comment_link’ hook on the author email

変更ログ

Since: 1.0.0

ソースファイル

edit_comment_link()は、以下のテンプレートファイル内に位置しています。

edit_comment_link() is located in

  • wp-includes/link-template.php (the latest stable version)
  • wp-includes/link-template.php (the development version)

関連テンプレートタグ

edit_post_link, edit_comment_link, edit_tag_link, edit_bookmark_link

Sponsored Link