edit_comment_link
Filter HookDescription
Filters the comment edit link anchor tag.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1668 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$link
|
Anchor tag for the edit link. |
string
|
$comment_id
|
Comment ID as a numeric string. |
string
|
$text
|
Anchor text. |
Usage Examples
Basic Usage
<?php
// Hook into edit_comment_link
add_filter('edit_comment_link', 'my_custom_filter', 10, 3);
function my_custom_filter($link, $comment_id, $text) {
// Your custom filtering logic here
return $link;
}
Source Code Context
wp-includes/link-template.php:1668
- How this hook is used in WordPress core
<?php
1663 *
1664 * @param string $link Anchor tag for the edit link.
1665 * @param string $comment_id Comment ID as a numeric string.
1666 * @param string $text Anchor text.
1667 */
1668 echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID, $text ) . $after;
1669 }
1670
1671 /**
1672 * Displays the edit bookmark link.
1673 *
PHP Documentation
<?php
/**
* Filters the comment edit link anchor tag.
*
* @since 2.3.0
*
* @param string $link Anchor tag for the edit link.
* @param string $comment_id Comment ID as a numeric string.
* @param string $text Anchor text.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.