comment_guid() WordPress Function

The comment_guid function is used to return the unique identifier for the current comment. This function is useful for making sure that each comment has a unique identifier, especially when comments are being imported or exported from a Wordpress site.

comment_guid( int|WP_Comment $comment_id = null ) #

Display the feed GUID for the current comment.


Parameters

$comment_id

(int|WP_Comment)(Optional)comment object or ID. Defaults to global comment object.

Default value: null


Top ↑

Source

File: wp-includes/feed.php

function comment_guid( $comment_id = null ) {
	echo esc_url( get_comment_guid( $comment_id ) );
}


Top ↑

Changelog

Changelog
VersionDescription
2.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.