wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_comment_guid › WordPress Function

Da2.5.0
Deprecaton/a
› get_comment_guid ( $comment_id = null )
Parametri:
  • (int|WP_Comment) $comment_id Optional comment object or ID. Defaults to global comment object.
    Richiesto: No
    Default: null
Ritorna:
  • (string|false) GUID for comment on success, false on failure.
Definito a:
Codex:

Retrieves the feed GUID for the current comment.



Sorgenti

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;
}