Same name and namespace in other branches
  1. 5.0.x advagg.drush.inc \drush_advagg_clear_all_files() 1 comment
  2. 6.0.x advagg.drush.inc \drush_advagg_clear_all_files() 1 comment
  3. 8.x-2.x advagg.drush.inc \drush_advagg_clear_all_files() 1 comment
  4. 8.x-3.x advagg.drush.inc \drush_advagg_clear_all_files() 1 comment
  5. 8.x-4.x advagg.drush.inc \drush_advagg_clear_all_files() 1 comment

Callback function for drush advagg-clear-all-files.

Callback is called by using drush_hook_command() where hook is the name of the module (advagg) and command is the name of the Drush command with all "-" characters converted to "_" characters.

File

./advagg.drush.inc, line 104

Code

function drush_advagg_clear_all_files() {
    // Clear out the cache.
    drush_advagg_clear_db_cache();
    // Run the command.
    module_load_include('inc', 'advagg', 'advagg.cache');
    list($css_files, $js_files) = advagg_remove_all_aggregated_files();
    // Report back the results.
    drush_log(dt('All AdvAgg files have been deleted. @css_count CSS files and @js_count JS files have been removed.', array(
        '@css_count' => count($css_files),
        '@js_count' => count($js_files),
    )), 'ok');
}