edit_comment_link()
Displays the edit comment link with formatting.
Uses: get_edit_comment_link()
Hooks from the function
Return
null
. Nothing (null).
Usage
edit_comment_link( $text, $before, $after );
- $text(string)
- Anchor text. If null. Default null.
Default: 'Edit This' - $before(string)
- Display before edit link.
Default: '' - $after(string)
- Display after edit link.
Default: ''
Examples
#1 Display a link to edit a comment
Use this code in the comments loop (comments.php file):
<?php edit_comment_link(); ?>
#2 Change the text of the link and put the link in the html tag <p>
:
<?php edit_comment_link( 'edit comment', '<p>', '</p>' ); ?>
Changelog
Since 1.0.0 | Introduced. |