get_edit_comment_link()
最后更新于:2021-11-26 09:07:39
get_edit_comment_link( int|GC_Comment$comment_id)Retrieves the edit comment link.
参数
- $comment_id
-
(int|GC_Comment) (Optional) Comment ID or GC_Comment object.
响应
(string|void) The edit comment link URL for the given comment.
源文件
文件: gc-includes/link-template.php
function get_edit_comment_link( $comment_id = 0 ) {
$comment = get_comment( $comment_id );
if ( ! current_user_can( 'edit_comment', $comment->comment_ID ) ) {
return;
}
$location = admin_url( 'comment.php?action=editcomment&c=' ) . $comment->comment_ID;
/**
* Filters the comment edit link.
*
* @since 2.3.0
*
* @param string $location The edit link.
*/
return apply_filters( 'get_edit_comment_link', $location );
}