function twitter_block_clear_js_cache in Twitter Block 7.2
Delete cached files and directory.
1 call to twitter_block_clear_js_cache()
- twitter_block_disable in ./
twitter_block.install - Implements hook_disable().
File
- ./
twitter_block.module, line 559 - A module to provide simple Twitter blocks using the Twitter Search API.
Code
function twitter_block_clear_js_cache() {
$path = 'public://twitter_block';
if (file_prepare_directory($path)) {
file_scan_directory($path, '/.*/', array(
'callback' => 'file_unmanaged_delete',
));
drupal_rmdir($path);
// Change query-strings on css/js files to enforce reload for all users.
_drupal_flush_css_js();
watchdog('twitter_block', 'Local cache has been purged.', array(), WATCHDOG_INFO);
}
}