Example #1
0
 function __construct()
 {
     global $hook_store;
     $plug_exists = $this->GetExistsPlugins();
     $plug_active = $this->GetActivePlugins();
     // load active and exists plugins
     foreach ($plug_active as $active) {
         if (in_array($active['plugin_name'], $plug_exists)) {
             include_once PLUGIN_DIR . $active['plugin_name'] . '/' . $active['plugin_name'] . '.php';
         }
     }
     // load all active hook
     $h_model = new TModel('hook');
     foreach ($h_model->ReadEx('hook_effect,hook_function_name') as $hook) {
         $hook_store[$hook['hook_effect']][] = $hook['hook_function_name'];
     }
 }