function example_node_operations() {
$operations = array(
'example_magic_operation_1' => array(
'label' => t('Works magic on your nodes'),
'callback' => 'example_operation',
'callback arguments' => array('bulkupdate', array('message' => TRUE)),
),
'example_magic_operation_2' => array(
'label' => t('Works even more magic on your nodes'),
'callback' => 'example_operation_2',
'callback arguments' => array('bulkupdate', array('message' => TRUE)),
),
);
return $operations;
}
// This function gets an array of nids from what was selected
// on the /admin/content screen
function example_operation(array $nids, $op, array $options = array()) {
foreach ($nids as $nid) {
// Work your magic here
}
}
No comments:
Post a Comment