You are here

function spam_spam_operations in Spam 6

Same name and namespace in other branches
  1. 5.3 spam.module \spam_spam_operations()

Implementation of hook_spam_operations(). Probably doesn't need to be an API hook, because spam functions won't differ much between submodules (ex. mark and unmark) and are already abstracted from the content type. Forms should only implement what they want out of this. TODO: refactor out of content submodules, take out of API calls. See spam_admin_overview_submit.

File

./spam.module, line 1467
Spam module, v3 Copyright(c) 2006-2008 Jeremy Andrews <jeremy@tag1consulting.com>. All rights reserved.

Code

function spam_spam_operations() {
  $operations = array(
    'markasspam' => array(
      'label' => t('Mark as spam'),
      'callback' => 'spam_operations_callback',
      'callback arguments' => array(
        'mark_as_spam',
      ),
    ),
    'markasnotspam' => array(
      'label' => t('Mark as not spam'),
      'callback' => 'spam_operations_callback',
      'callback arguments' => array(
        'mark_as_not_spam',
      ),
    ),
    'trainasnotspam' => array(
      'label' => t('Train as not spam'),
      'callback' => 'spam_operations_callback',
      'callback arguments' => array(
        'train_as_not_spam',
      ),
    ),
    'publish' => array(
      'label' => t('Publish'),
      'callback' => 'spam_operations_callback',
      'callback arguments' => array(
        'publish',
      ),
    ),
    'unpublish' => array(
      'label' => t('Unpublish'),
      'callback' => 'spam_operations_callback',
      'callback arguments' => array(
        'unpublish',
      ),
    ),
  );
  return $operations;
}