You are here

function hook_cleaner_run in Cleaner 7

Cleaner execution hook.

1 function implements hook_cleaner_run()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

cleaner_cleaner_run in ./cleaner.module
Implements hook_cleaner_run().
2 invocations of hook_cleaner_run()
CleanerTestBase::cleanerExecute in tests/cleaner_base.test
Execute hook_cleaner_run().
cleaner_cron in ./cleaner.module
Implements hook_cron().

File

./cleaner.api.php, line 104
Hooks provided by the Cleaner module.

Code

function hook_cleaner_run() {

  // Watchdog.
  if (variable_get('cleaner_empty_watchdog', FALSE)) {
    Cleaner::cleanerWatchdogClear();
  }

  // Cache.
  if (variable_get('cleaner_clear_cache', FALSE)) {
    Cleaner::cleanerCacheClear();
  }

  // Sessions.
  if (variable_get('cleaner_clean_sessions', 0)) {
    Cleaner::cleanerSessionsClear();
  }

  // CSS.
  if (variable_get('cleaner_clean_cssdir', FALSE)) {
    Cleaner::cleanerCssClear();
  }

  // JS.
  if (variable_get('cleaner_clean_jsdir', FALSE)) {
    Cleaner::cleanerJsClear();
  }

  // MySQL optimizing.
  if ($opt = variable_get('cleaner_optimize_db', FALSE)) {
    Cleaner::cleanerMysqlOptimizing($opt);
  }
}