taxonomy_orphanage.drush.inc 649 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * @file
  4. * Drush callbacks for taxonomy_orphanage.
  5. */
  6. /**
  7. * Implements hook_drush_command().
  8. */
  9. function taxonomy_orphanage_drush_command() {
  10. $items = array();
  11. $items['taxonomy-orphanage-roundup'] = array(
  12. 'description' => 'Finds and removes orphaned taxonomy references.',
  13. 'aliases' => array('tor'),
  14. 'options' => array(
  15. 'limit' => 'The number of entities to process per field.',
  16. ),
  17. );
  18. return $items;
  19. }
  20. /**
  21. * Drush callback that passes off the roundup to our internal function.
  22. */
  23. function drush_taxonomy_orphanage_roundup() {
  24. taxonomy_orphanage_roundup(FALSE, drush_get_option('limit', -1));
  25. }