Resource functions
Collection functions
Search functions
IIIF
Metadata functions
User functions
System
Message functions
Plugin functions

delete_comment

Delete a resource comment by specifying the comment ref. This function is for the removal of comments not connected to annotations.

Where the comment being deleted is part of a hierarchical structure (system config $comments_flat_view = false;) and there comments below it, the deleted comment will be hidden and shown as "Deleted". The tree will be fully deleted only once the lower level items have been removed.

* Available from version 11.0.

Variable Description Data type
$comment_ref * ID of the comment to be deleted. integer

Return values

Returns true if the operation is successful. Returns false if resource comments are disabled on the system or the user making the request has insufficient permissions to delete comments.