WordPress:Template Tags/edit comment link
来自站长百科
Description
Displays a link to edit the current comment, if the user is logged in and allowed to edit the comment. It must be within WordPress:The Loop, and within a comment loop.
Usage
%%% <?php edit_comment_link('link', 'before', 'after'); ?> %%%
Examples
Default Usage
Displays edit comment link using defaults.
<?php edit_comment_link(); ?>
Displays Edit Comment in Paragraph Tag
Displays edit comment link, with link text "edit comment", in a paragraph (<p>) tag.
<?php edit_comment_link('edit comment', '<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.