get_edit_comment_link
Filter HookDescription
Filters the comment edit link.Hook Information
File Location |
wp-includes/link-template.php
View on GitHub
|
Hook Type | Filter |
Line Number | 1634 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$location
|
The edit link. |
int
|
$comment_id
|
Unique ID of the comment to generate an edit link. |
string
|
$context
|
Context to include HTML entities in link. Default 'display'. |
Usage Examples
Basic Usage
<?php
// Hook into get_edit_comment_link
add_filter('get_edit_comment_link', 'my_custom_filter', 10, 3);
function my_custom_filter($location, $comment_id, $context) {
// Your custom filtering logic here
return $location;
}
Source Code Context
wp-includes/link-template.php:1634
- How this hook is used in WordPress core
<?php
1629 *
1630 * @param string $location The edit link.
1631 * @param int $comment_id Unique ID of the comment to generate an edit link.
1632 * @param string $context Context to include HTML entities in link. Default 'display'.
1633 */
1634 return apply_filters( 'get_edit_comment_link', $location, $comment_id, $context );
1635 }
1636
1637 /**
1638 * Displays the edit comment link with formatting.
1639 *
PHP Documentation
<?php
/**
* Filters the comment edit link.
*
* @since 2.3.0
* @since 6.7.0 The $comment_id and $context parameters are now being passed to the filter.
*
* @param string $location The edit link.
* @param int $comment_id Unique ID of the comment to generate an edit link.
* @param string $context Context to include HTML entities in link. Default 'display'.
*/
Quick Info
- Hook Type: Filter
- Parameters: 3
- File: wp-includes/link-template.php
Related Hooks
Related hooks will be displayed here in future updates.