You are here

function node_age_spamapi in Spam 5.3

File

filters/node_age/node_age.module, line 30

Code

function node_age_spamapi($op, $type = NULL, $content = array(), $fields = array(), $extra = NULL) {
  switch ($op) {
    case 'filter':
      if (!module_invoke('spam', 'filter_enabled', 'node_age', $type, $content, $fields, $extra)) {
        return;
      }
      return node_age_spam_filter($content, $type, $fields, $extra);
    case 'filter_module':
      return 'node_age';
    case 'filter_info':
      return array(
        'name' => t('Node age'),
        'module' => t('node_age'),
        'description' => t('A node-age comment spam filter.'),
        'help' => t('The node-age filter assigns a higher spam probability to comments made against older nodes.'),
      );
      break;
    case 'filter_install':
      return array(
        'status' => SPAM_FILTER_ENABLED,
        'gain' => 150,
        'weight' => -2,
      );
  }
}