Pull merge.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / node_operations.twig
1 /**
2  * Implements hook_node_operations().
3  */
4 function {{ machine_name }}_node_operations() {
5   $operations = array(
6     'publish' => array(
7       'label' => t('Publish selected content'),
8       'callback' => 'node_mass_update',
9       'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED)),
10     ),
11     'unpublish' => array(
12       'label' => t('Unpublish selected content'),
13       'callback' => 'node_mass_update',
14       'callback arguments' => array('updates' => array('status' => NODE_NOT_PUBLISHED)),
15     ),
16     'promote' => array(
17       'label' => t('Promote selected content to front page'),
18       'callback' => 'node_mass_update',
19       'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'promote' => NODE_PROMOTED)),
20     ),
21     'demote' => array(
22       'label' => t('Demote selected content from front page'),
23       'callback' => 'node_mass_update',
24       'callback arguments' => array('updates' => array('promote' => NODE_NOT_PROMOTED)),
25     ),
26     'sticky' => array(
27       'label' => t('Make selected content sticky'),
28       'callback' => 'node_mass_update',
29       'callback arguments' => array('updates' => array('status' => NODE_PUBLISHED, 'sticky' => NODE_STICKY)),
30     ),
31     'unsticky' => array(
32       'label' => t('Make selected content not sticky'),
33       'callback' => 'node_mass_update',
34       'callback arguments' => array('updates' => array('sticky' => NODE_NOT_STICKY)),
35     ),
36     'delete' => array(
37       'label' => t('Delete selected content'),
38       'callback' => NULL,
39     ),
40   );
41   return $operations;
42 }