You are here

function custom_pub_action_info in Custom Publishing Options 6

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

Implements hook_action_info().

File

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

Code

function custom_pub_action_info() {
  $actions["custom_pub_on_action"] = array(
    '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(
    '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;
}