You are here

function antispam_content_load in AntiSpam 7

Same name and namespace in other branches
  1. 6 antispam.module \antispam_content_load()

Load 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

mixed An object with requested content; FALSE on failure.

5 calls to antispam_content_load()
antispam_callback_set_published_status in ./antispam.module
Menu callback; publish/unpublish content.
antispam_callback_set_spam_status in ./antispam.module
Menu callback; mark/unmark content as spam.
antispam_confirm_multiple_operation in ./antispam.admin.inc
antispam_confirm_multiple_operation_submit in ./antispam.admin.inc
confirm_form callback; perform the actual operation against selected content.
antispam_notify_moderators in ./antispam.module
Notify moderators of new/updated content, only content needing approval or nothing at all.

File

./antispam.module, line 1814
Primary hook implementations for the Antispam module.

Code

function antispam_content_load($content_type, $content_id) {
  switch ($content_type) {
    case 'node':
      $content = node_load($content_id);
      break;
    case 'comment':
      $content = comment_load($content_id);
      break;
  }
  return $content;
}