function drush_node_revision_delete in Node Revision Delete 7.2
Same name and namespace in other branches
- 8 node_revision_delete.drush.inc \drush_node_revision_delete()
- 7.3 node_revision_delete.drush.inc \drush_node_revision_delete()
Implements drush_COMMANDFILE_COMMANDNAME().
File
- ./
node_revision_delete.drush.inc, line 67 - Drush integration for node_revision_delete.
Code
function drush_node_revision_delete($content_type, $revisions_to_keep) {
// Set up the batch job.
$batch = array(
'operations' => array(
array(
'node_revision_delete_batch_process',
array(
$content_type,
$revisions_to_keep,
),
),
),
'title' => dt('Node Revision Delete batch job'),
'init_message' => dt('Starting...'),
'error_message' => dt('An error occurred'),
'finished' => 'node_revision_delete_batch_finish',
'file' => drupal_get_path('module', 'node_revision_delete') . '/node_revision_delete.batch.inc',
);
// Start the batch job.
batch_set($batch);
drush_backend_batch_process();
}