You are here

function drush_classified_expire in Classified Ads 7.3

Same name and namespace in other branches
  1. 6.3 classified.drush.inc \drush_classified_expire()

Command callback for classified-expire. No output: nothing to return.

File

./classified.drush.inc, line 97
Drush 8 plugin for classified.module.

Code

function drush_classified_expire() {
  module_load_include('inc', 'classified', 'classified.scheduled');
  $expired = _classified_scheduled_build_expire();
  $params = _classified_drush_get_action_stats($expired);
  if ($params['@node_count']) {
    drush_print(dt('Expired @node_count ads by @user_count users.', $params));
  }
  else {
    drush_print(dt('Expire did not find any node to unpublish.'));
  }
}