function antispam_content_delete in AntiSpam 7
Same name and namespace in other branches
- 6 antispam.module \antispam_content_delete()
Delete a node or a comment.
Parameters
string $content_type: Content type; can be either 'node' or 'comment' .
integer $content_id: Content ID; can be either a nid or a cid.
Return value
boolean TRUE if specified was there; FALSE otherwise.
2 calls to antispam_content_delete()
- antispam_confirm_multiple_operation_submit in ./
antispam.admin.inc - confirm_form callback; perform the actual operation against selected content.
- antispam_cron_shutdown in ./
antispam.cron.inc - Shutdown function executed at cron time.
File
- ./
antispam.module, line 1838 - Primary hook implementations for the Antispam module.
Code
function antispam_content_delete($content_type, $content_id) {
module_load_include('inc', 'comment', 'comment.admin');
if ($content_type == 'node') {
node_delete($content_id);
return TRUE;
}
elseif ($content_type == 'comment') {
comment_delete($content_id);
return TRUE;
}
return FALSE;
}