wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_comment_guid › WordPress Function

Desde2.5.0
Obsoleton/a
get_comment_guid ( $comment_id = null )
Parâmetros:
  • (int|WP_Comment) $comment_id Optional comment object or ID. Defaults to global comment object.
    Required: No
    Padrão: null
Retorna:
  • (string|false) GUID for comment on success, false on failure.
Definido em:
Codex:

Retrieves the feed GUID for the current comment.



Fonte

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