edit_post_link – WordPress*リファレンス
ユーザがログインされて、ポストを編集することができるなら、現在のポストを編集するためにリンクを表示します。 Loopの中にそれはあるに違いありません。
⇒Displays a link to edit the current post, if a user is logged in and allowed to edit the post. It must be within The Loop.
タグ使用方法
<?php edit_post_link('link', 'before', 'after'); ?>
例
Default Usage
表示は、デフォルトを使用することでポストリンクを編集します。
⇒Displays edit post link using defaults.
<?php edit_post_link(); ?>
Display Edit in Paragraph Tag
表示はパラグラフ(<p>)タグでリンクテキスト「編集」とのポストリンクを編集します。
⇒Displays edit post link, with link text “edit”, in a paragraph (<p>) tag.
<?php edit_post_link('edit', '<p>', '</p>'); ?>
Parameters
*link
(string) リンクテキスト。 ‘これを編集する’ために、デフォルトとします。
⇒The link text. Defaults to ‘Edit This’.
*before
(string) リンクテキストの前に置くテキスト。 デフォルトが全くありません。
⇒Text to put before the link text. There is no default.
*after
(string) リンクテキストの後に置くテキスト。 デフォルトが全くありません。
⇒Text to put after the link text. There is no default.
使用例
関連テンプレートタグ
edit_post_link, edit_comment_link, link_pages, wp_link_pages, get_year_link, get_month_link, get_day_link
関連記事







