foreach ($look_for_class as $file) { if (is_file($file)) { require_once $file; if (class_exists($class_name)) { break; } } } } spl_autoload_register('_pressbooks_autoload'); // ------------------------------------------------------------------------------------------------------------------- // Configure root site // ------------------------------------------------------------------------------------------------------------------- register_activation_hook(__FILE__, function () { $activate = new \PressBooks\Activation(); $activate->registerActivationHook(); }); // ------------------------------------------------------------------------------------------------------------------- // Initialize // ------------------------------------------------------------------------------------------------------------------- $GLOBALS['pressbooks'] = new \PressBooks\PressBooks(); // ------------------------------------------------------------------------------------------------------------------- // Hooks // ------------------------------------------------------------------------------------------------------------------- require PB_PLUGIN_DIR . 'hooks.php'; if (is_admin()) { require PB_PLUGIN_DIR . 'hooks-admin.php'; } // -------------------------------------------------------------------------------------------------------------------- // Shortcuts to help template designers who don't use real namespaces... // --------------------------------------------------------------------------------------------------------------------