edit_tag_link

Sponsored Link

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

get_edit_tag_linkは、編集のためのURLを取得するために使用します。

Sponsored Link

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

Use get_edit_tag_link to retrieve the url to edit.

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

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

edit_tag_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

tag

(integer|object) (optional) タグオブッジェクトあるいはIDです。

(integer|object) (optional) Tag object or ID.

Default: Current tag ID.

デフォルトの使い方

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

Displays edit tag link using defaults.

<?php edit_tag_link(); ?>

パラグラフタグ内にタグ編集を表示します。

パラグラフ(

)タグ内に、”edit tag”のリンクテキストで、タグを編集するリンクを表示します。

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

) tag.

<?php edit_tag_link('edit tag', '<p>', '</p>'); ?>

変更ログ

Since: 2.7.0

ソースファイル

edit_tag_link() は、以下のファイル内に位置しています。

edit_tag_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