edit_comment_link
Filters the comment edit link anchor tag.
Использование
add_filter( 'edit_comment_link', 'wp_kama_edit_comment_link_filter', 10, 3 );
/**
* Function for `edit_comment_link` filter-hook.
*
* @param string $link Anchor tag for the edit link.
* @param string $comment_id Comment ID as a numeric string.
* @param string $text Anchor text.
*
* @return string
*/
function wp_kama_edit_comment_link_filter( $link, $comment_id, $text ){
// filter...
return $link;
}
- $link(строка)
- Anchor tag for the edit link.
- $comment_id(строка)
- Comment ID as a numeric string.
- $text(строка)
- Anchor text.
Список изменений
| С версии 2.3.0 | Введена. |
Где вызывается хук
edit_comment_link
wp-includes/link-template.php 1668
echo $before . apply_filters( 'edit_comment_link', $link, $comment->comment_ID, $text ) . $after;