模板标签-edit_comment_link()

0条评论

说明

若用户已登录且具有编辑评论的权限,该标签显示一个可编辑当前评论的链接。该标签必须用在主循环(loop)与评论循环中。

用法

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

参数

$link

(字符串)(可选)链接文本

默认值:'Edit This' (编辑该评论)

$before

(字符串)(可选)显示在链接文本前的文字信息

默认值:None

$after

(字符串)(可选)显示在链接文本后的文字信息

默认值:None

示例

默认用法

根据默认设置显示评论的编辑链接

<?php edit_comment_link(); ?>  

在段落标签中显示评论编辑链接

在段落标签(<p>)中显示评论的编辑链接,链接文本为“edit comment”(编辑该评论)。

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

历史记录

始见于 WordPress 1.0.0

源文件

edit_comment_link() 位于 wp-includes/link-template.php中。

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • 自动断行和分段。

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.