function themekey_abstract_rule_disable in ThemeKey 7.3
3 calls to themekey_abstract_rule_disable()
- themekey_css_rule_disable in themekey_css/
themekey_css_build.inc - Disables a ThemeKey rule and all children.
- themekey_redirect_rule_disable in themekey_redirect/
themekey_redirect_build.inc - Disables a ThemeKey rule and all children.
- themekey_rule_disable in ./
themekey_build.inc - Disables a ThemeKey rule and all children.
File
- ./
themekey_build.inc, line 475 - The functions in this file are the back end of ThemeKey which should be used only if you configure something, but not when ThemeKey switches themes.
Code
function themekey_abstract_rule_disable($table, $id) {
// TRANSACTIONS - SEE http://drupal.org/node/355875
// The transaction opens here.
$txn = db_transaction();
$childs = themekey_load_rules($id);
$ids = array_merge(array(
$id,
), array_keys($childs));
foreach ($ids as $id) {
db_update($table)
->fields(array(
'enabled' => 0,
))
->condition('id', $id)
->execute();
}
}