Exemplo n.º 1
0
 /**
  */
 public function finalize()
 {
     // run parent first
     if (true === parent::finalize()) {
         // hook in to body class filter
         add_filter('body_class', array($this, 'add_body_class'));
     }
 }
Exemplo n.º 2
0
 /**
  * Enable components for the scheme by passing a valid policy object
  *
  * @param ICE_Policy $policy
  * @param string $ini_file_name
  * @return boolean
  */
 public function enable_component(ICE_Policy $policy)
 {
     // loop through entire theme stack BOTTOM UP and try to load options
     foreach ($this->theme_stack(false) as $theme) {
         // path to ini file
         $ini_file = $this->theme_config_file($theme, $policy->get_handle());
         // load the option config if it exists
         if (ICE_Files::cache($ini_file)->is_readable()) {
             // skip loaded files
             if ($this->config_files_loaded->contains($ini_file)) {
                 continue;
             }
             // try to load ini file
             if ($policy->registry()->load_config_file($ini_file, $theme)) {
                 // push onto loaded stack
                 $this->config_files_loaded->push($ini_file);
             }
         }
     }
     // finalize policy
     $policy->finalize();
     return true;
 }