protected function autoload()
{
// Check if there is a autoload.php file.
// Meaning we're in development mode or
// the plugin has been installed on a "classic" WordPress configuration.
if (file_exists($autoload = __DIR__ . DS . 'vendor' . DS . 'autoload.php')) {
require $autoload;
// Developers using the framework in a "classic" WordPress
// installation can activate this by defining
// a THEMOSIS_ERROR constant and set its value to true or false
// depending of their environment.
if (defined('THEMOSIS_ERROR') && THEMOSIS_ERROR) {
$whoops = new \Whoops\Run();
$whoops->pushHandler(new \Whoops\Handler\PrettyPageHandler());
$whoops->register();
}
}
}