function _css_injector_delete_rule in CSS Injector 7
Same name and namespace in other branches
- 6 css_injector.module \_css_injector_delete_rule()
Helper function to delete an existing rule and its accompanying file.
1 call to _css_injector_delete_rule()
- css_injector_delete_confirm_submit in ./
css_injector.admin.inc - Execute node deletion.
File
- ./
css_injector.module, line 245 - Allows administrators to inject CSS into the page output based on configurable rules. Useful for adding simple CSS tweaks without modifying a site's official theme.
Code
function _css_injector_delete_rule($crid) {
if ($rule = _css_injector_load_rule($crid)) {
file_unmanaged_delete(_css_injector_rule_uri($crid));
db_delete('css_injector_rule')
->condition('crid', $crid)
->execute();
drupal_set_message(t('The CSS rule %title has been deleted.', array(
'%title' => $rule['title'],
)));
}
}