You are here

function comment_action_info in Drupal 7

Same name and namespace in other branches
  1. 6 modules/comment/comment.module \comment_action_info()

Implements hook_action_info().

File

modules/comment/comment.module, line 2521
Enables users to comment on published content.

Code

function comment_action_info() {
  return array(
    'comment_publish_action' => array(
      'label' => t('Publish comment'),
      'type' => 'comment',
      'configurable' => FALSE,
      'behavior' => array(
        'changes_property',
      ),
      'triggers' => array(
        'comment_presave',
        'comment_insert',
        'comment_update',
      ),
    ),
    'comment_unpublish_action' => array(
      'label' => t('Unpublish comment'),
      'type' => 'comment',
      'configurable' => FALSE,
      'behavior' => array(
        'changes_property',
      ),
      'triggers' => array(
        'comment_presave',
        'comment_insert',
        'comment_update',
      ),
    ),
    'comment_unpublish_by_keyword_action' => array(
      'label' => t('Unpublish comment containing keyword(s)'),
      'type' => 'comment',
      'configurable' => TRUE,
      'behavior' => array(
        'changes_property',
      ),
      'triggers' => array(
        'comment_presave',
        'comment_insert',
        'comment_update',
      ),
    ),
    'comment_save_action' => array(
      'label' => t('Save comment'),
      'type' => 'comment',
      'configurable' => FALSE,
      'triggers' => array(
        'comment_insert',
        'comment_update',
      ),
    ),
  );
}