You are here

function custom_pub_action_info in Custom Publishing Options 7

Same name and namespace in other branches
  1. 6 custom_pub.module \custom_pub_action_info()

Implements hook_action_info().

File

./custom_pub.module, line 223
Adds the ability to add Custom publishing options to the node Add/Edit forms.

Code

function custom_pub_action_info() {
  $actions['custom_pub_on_action'] = array(
    'label' => 'Toggle a Custom Publishing Option on',
    'type' => 'node',
    'description' => t('Toggle a Custom Publishing Option on'),
    'configurable' => TRUE,
    'behavior' => array(
      'changes_node_property',
    ),
    'hooks' => array(
      'nodeapi' => array(
        'presave',
      ),
      'comment' => array(
        'insert',
        'update',
      ),
    ),
  );
  $actions['custom_pub_off_action'] = array(
    'label' => 'Toggle a Custom Publishing Option off',
    'type' => 'node',
    'description' => t('Toggle a Custom Publishing Option off'),
    'configurable' => TRUE,
    'behavior' => array(
      'changes_node_property',
    ),
    'hooks' => array(
      'nodeapi' => array(
        'presave',
      ),
      'comment' => array(
        'delete',
        'insert',
        'update',
      ),
    ),
  );
  return $actions;
}