wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_comment_guid › WordPress Function

Od2.5.0
Przestarzałyn/a
get_comment_guid ( $comment_id = null )
Parametry:
  • (int|WP_Comment) $comment_id Optional comment object or ID. Defaults to global comment object.
    Wymagane: Nie
    Domyślny: null
Powrót:
  • (string|false) GUID for comment on success, false on failure.
Zdefiniowane na:
Codex:

Retrieves the feed GUID for the current comment.



Źródło

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