node_action_info

Versions
6 – 7
node_action_info()

Implement hook_action_info().

Code

modules/node/node.module, line 2977

<?php
function node_action_info() {
  return array(
    'node_publish_action' => array(
      'type' => 'node',
      'label' => t('Publish content'),
      'configurable' => FALSE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_unpublish_action' => array(
      'type' => 'node',
      'label' => t('Unpublish content'),
      'configurable' => FALSE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_make_sticky_action' => array(
      'type' => 'node',
      'label' => t('Make content sticky'),
      'configurable' => FALSE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_make_unsticky_action' => array(
      'type' => 'node',
      'label' => t('Make content unsticky'),
      'configurable' => FALSE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_promote_action' => array(
      'type' => 'node',
      'label' => t('Promote content to front page'),
      'configurable' => FALSE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_unpromote_action' => array(
      'type' => 'node',
      'label' => t('Remove content from front page'),
      'configurable' => FALSE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_assign_owner_action' => array(
      'type' => 'node',
      'label' => t('Change the author of content'),
      'configurable' => TRUE,
      'behavior' => array('changes_property'),
      'triggers' => array('node_presave', 'comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_save_action' => array(
      'type' => 'node',
      'label' => t('Save content'),
      'configurable' => FALSE,
      'triggers' => array('comment_insert', 'comment_update', 'comment_delete'),
    ),
    'node_unpublish_by_keyword_action' => array(
      'type' => 'node',
      'label' => t('Unpublish content containing keyword(s)'),
      'configurable' => TRUE,
      'triggers' => array('node_presave', 'node_insert', 'node_update'),
    ),
  );
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.