You are here

function themekey_features_save_rule_childs in ThemeKey 6.3

Same name and namespace in other branches
  1. 6.4 themekey_features.module \themekey_features_save_rule_childs()
  2. 7.3 themekey_features.module \themekey_features_save_rule_childs()
  3. 7 themekey_features.module \themekey_features_save_rule_childs()
  4. 7.2 themekey_features.module \themekey_features_save_rule_childs()

Takes a serialized ThemeKey Rule Chain as created by themekey_features_load_rule_childs() and replaces the current one in the database eith it.

Parameters

$childs: serialized ThemeKey Rule Chain as array

$parent: internal use in recursion

1 call to themekey_features_save_rule_childs()
themekey_features_rule_chain_features_rebuild in ./themekey_features.module
Implementation of hook_features_rebuild().

File

./themekey_features.module, line 145

Code

function themekey_features_save_rule_childs($childs, $parent = 0) {
  module_load_include('inc', 'themekey', 'themekey_build');
  foreach ($childs as $child) {
    $child['rule']['parent'] = $parent;
    themekey_rule_set($child['rule']);
    themekey_features_save_rule_childs($child['childs'], $child['rule']['id']);
  }
}