You are here

function node_node_operations in Drupal 6

Same name and namespace in other branches
  1. 5 modules/node/node.module \node_node_operations()
  2. 7 modules/node/node.admin.inc \node_node_operations()

Implementation of hook_node_operations().

File

modules/node/node.admin.inc, line 86
Content administration and module settings UI.

Code

function node_node_operations() {
  $operations = array(
    'publish' => array(
      'label' => t('Publish'),
      'callback' => 'node_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'status' => 1,
        ),
      ),
    ),
    'unpublish' => array(
      'label' => t('Unpublish'),
      'callback' => 'node_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'status' => 0,
        ),
      ),
    ),
    'promote' => array(
      'label' => t('Promote to front page'),
      'callback' => 'node_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'status' => 1,
          'promote' => 1,
        ),
      ),
    ),
    'demote' => array(
      'label' => t('Demote from front page'),
      'callback' => 'node_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'promote' => 0,
        ),
      ),
    ),
    'sticky' => array(
      'label' => t('Make sticky'),
      'callback' => 'node_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'status' => 1,
          'sticky' => 1,
        ),
      ),
    ),
    'unsticky' => array(
      'label' => t('Remove stickiness'),
      'callback' => 'node_mass_update',
      'callback arguments' => array(
        'updates' => array(
          'sticky' => 0,
        ),
      ),
    ),
    'delete' => array(
      'label' => t('Delete'),
      'callback' => NULL,
    ),
  );
  return $operations;
}