检索当前注释的订阅源GUID。
原型
get_comment_guid( int|WP_Comment $comment_id = null )
参数
$comment_id
(int|WP_Comment)
(Optional)
评论对象或ID。默认为全局注释对象。
返回值
(false|string)
失败时的错误或对成功评论的指导。
源文件
路径:wp-includes/feed.php
<?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;
}
...
?>
其他
英文文档:https://developer.wordpress.org/reference/functions/get_comment_guid/