Exemple #1
0
 function load_plugins($plugins = array())
 {
     $plugins = count($plugins) ? $plugins : Trax::$plugins;
     foreach ((array) $plugins as $plugin) {
         if (file_exists(self::$plugins_path . "/{$plugin}/init.php")) {
             include_once self::$plugins_path . "/{$plugin}/init.php";
             $loaded_plugins[] = $plugin;
         }
     }
     Trax::$plugins = (array) $loaded_plugins;
 }