WordPress: Template Tags/edit post link:修订间差异

来自站长百科
跳转至: 导航、​ 搜索
(新页面: == Description == Displays a link to edit the current post, if a user is logged in and allowed to edit the post. It must be within WordPress:The Loop. == Usage == %%% <?php edit_po...)
 
无编辑摘要
第1行: 第1行:
== Description ==
== Description ==
== 描述 ==


Displays a link to edit the current post, if a user is logged in and allowed to edit the post. It must be within [[WordPress:The 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 [[WordPress:The Loop]].
显示一个链接来编辑当前的文章,如果用户已经登录,允许用户编辑文章。必须在[[WordPress:The Loop|Loop]]内。


== Usage ==
== Usage ==
== 用法 ==
%%% <?php edit_post_link('link', 'before', 'after'); ?> %%%


%%% <?php edit_post_link('link', 'before', 'after'); ?> %%%
%%% <?php edit_post_link('link', 'before', 'after'); ?> %%%


== Examples ==
== Examples ==
== 例子==


=== Default Usage ===
=== Default Usage ===
== 默认用法 ==


Displays edit post link using defaults.
Displays edit post link using defaults.
使用默认设置显示编辑文章链接。
  <?php edit_post_link(); ?>
  <?php edit_post_link(); ?>
<?php edit_post_link(); ?>


=== Display Edit in Paragraph Tag ===
=== Display Edit in Paragraph Tag ===
=== 在段落标签中显示编辑===


Displays edit post link, with link text "edit", in a paragraph (&lt;p&gt;) tag.
Displays edit post link, with link text "edit", in a paragraph (&lt;p&gt;) tag.
在一个段落(&lt;p&gt;)标签中,显示编辑文章链接,拥有链接文本"编辑"。
<?php edit_post_link('edit', '&lt;p&gt;', '&lt;/p&gt;'); ?>


<?php edit_post_link('edit', '&lt;p&gt;', '&lt;/p&gt;'); ?>
<?php edit_post_link('edit', '&lt;p&gt;', '&lt;/p&gt;'); ?>


== Parameters ==
== Parameters ==
== 参数==


; link : (''string'') The link text. Defaults to <tt>'Edit This'</tt>.
; link : (''string'') The link text. Defaults to <tt>'Edit This'</tt>.
; before : (''string'') Text to put before the link text. There is no default.
; 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.
; after : (''string'') Text to put after the link text. There is no default.
;链接(''string'')链接文本。默认为<tt>'编辑这个'</tt>。
;之前:(''string'')链接文本之前放置的文本。没有默认设置。
;之后:(''string'')链接文本之后放置的文本。没有默认设置。


== Related ==
== Related ==
第32行: 第56行:


{{PHP Function Tag Footer}}
{{PHP Function Tag Footer}}
== 相关的 ==
{{标签 链接标签}}
{{PHP函数 标签 页底文字}}

2008年7月5日 (六) 15:40的版本

Description

描述

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

显示一个链接来编辑当前的文章,如果用户已经登录,允许用户编辑文章。必须在Loop内。

Usage

用法

%%% <?php edit_post_link('link', 'before', 'after'); ?> %%%

%%% <?php edit_post_link('link', 'before', 'after'); ?> %%%

Examples

例子

Default Usage

默认用法

Displays edit post link using defaults. 使用默认设置显示编辑文章链接。

<?php edit_post_link(); ?>

<?php edit_post_link(); ?>

Display Edit in Paragraph Tag

在段落标签中显示编辑

Displays edit post link, with link text "edit", in a paragraph (<p>) tag. 在一个段落(<p>)标签中,显示编辑文章链接,拥有链接文本"编辑"。

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

<?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.

;链接(string)链接文本。默认为'编辑这个'。 ;之前:(string)链接文本之前放置的文本。没有默认设置。 ;之后:(string)链接文本之后放置的文本。没有默认设置。

Related

模板:Tag Link Tags

模板:PHP Function Tag Footer

相关的

模板:标签 链接标签