get_comment_guid()
Retrieves the feed GUID for the current comment.
Хуков нет.
Возвращает
string|false. GUID for comment on success, false on failure.
Использование
get_comment_guid( $comment_id );
- $comment_id(int|WP_Comment)
- Optional comment object or ID.
По умолчанию:global comment object
Список изменений
| С версии 2.5.0 | Введена. |
Код get_comment_guid() get comment guid WP 7.1.3
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;
}