Uses
Uses | Description |
---|---|
wp-includes/post-template.php: get_the_guid() | Retrieve the Post Global Unique Identifier (guid). |
wp-includes/comment.php: get_comment() | Retrieves comment data given a comment ID or comment object. |
Retrieve the feed GUID for the current comment.
(int|WP_Comment) (Optional) comment object or ID. Defaults to global comment object.
Default value: null
(string|false) GUID for comment on success, false on failure.
File: wp-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; }
Version | Description |
---|---|
2.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_comment_guid