You are here

function node_revision_delete_drush_command in Node Revision Delete 7.2

Same name and namespace in other branches
  1. 8 node_revision_delete.drush.inc \node_revision_delete_drush_command()
  2. 7.3 node_revision_delete.drush.inc \node_revision_delete_drush_command()

Implements COMMANDFILE_drush_command().

File

./node_revision_delete.drush.inc, line 11
Drush integration for node_revision_delete.

Code

function node_revision_delete_drush_command() {
  $items = array();
  $items['node-revision-delete'] = array(
    'description' => dt('Deletes old node revisions for a given content type.'),
    'arguments' => array(
      'type' => dt("A content type's machine name."),
      'revisions' => dt('The maximum amount of revisions to keep per node for this content type.'),
    ),
    'required-arguments' => TRUE,
    'examples' => array(
      'drush nrd article 50' => dt('Keeps the latest 50 revisions of every article. Deletes the rest.'),
    ),
    'aliases' => array(
      'nrd',
    ),
    'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
  );
  return $items;
}