Un motore di ricerca WordPress per sviluppatori e autori di temi



get_comment_guid ›

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:
  • (false|string) false on failure or guid for comment on success.
Definito a:
Codex:

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