function ctools_css_clear
Remove stored CSS and any associated file.
1 call to ctools_css_clear()
- ctools_stylizer_cleanup_style in includes/
stylizer.inc - Clean up no longer used files.
File
-
includes/
css.inc, line 120
Code
function ctools_css_clear($id) {
$cache = db_query('SELECT * FROM {ctools_css_cache} WHERE cid = :cid', array(
':cid' => $id,
))->fetchObject();
if (!$cache) {
return;
}
if (file_exists($cache->filename)) {
file_unmanaged_delete($cache->filename);
// If we remove an existing file, there may be cached pages that refer
// to it. We must get rid of them: FIXME same format in D7?
cache_clear_all();
}
db_delete('ctools_css_cache')->condition('cid', $id)
->execute();
}