get_edit_comment_link
Filters the comment edit link.
Usage
add_filter( 'get_edit_comment_link', 'wp_kama_get_edit_comment_link_filter', 10, 3 );
/**
* Function for `get_edit_comment_link` filter-hook.
*
* @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.
*
* @return string
*/
function wp_kama_get_edit_comment_link_filter( $location, $comment_id, $context ){
// filter...
return $location;
}
- $location(string)
- The edit link.
- $comment_id(int)
- Unique ID of the comment to generate an edit link.
- $context(string)
- Context to include HTML entities in link.
Default: 'display'
Changelog
| Since 2.3.0 | Introduced. |
| Since 6.7.0 | The $comment_id and $context parameters are now being passed to the filter. |
Where the hook is called
get_edit_comment_link
wp-includes/link-template.php 1634
return apply_filters( 'get_edit_comment_link', $location, $comment_id, $context );