get_comment_guid()
最后更新于:2021-11-26 08:48:36
get_comment_guid( int|GC_Comment$comment_id=null)Retrieve the feed GUID for the current comment.
参数
- $comment_id
-
(int|GC_Comment) (Optional) comment object or ID. Defaults to global comment object.
Default value: null
响应
(string|false) GUID for comment on success, false on failure.
源文件
文件: gc-includes/feed.php
function get_comment_guid( $comment_id = null ) {
$comment = get_comment( $comment_id );
if ( ! is_object( $comment ) ) {
return false;
}
return get_the_guid( $comment->comment_post_ID ) . '#comment-' . $comment->comment_ID;
}