public function loadPlugins()
{
if (empty($this->config['plugins']) || !defined('WP_PLUGIN_DIR')) {
return;
}
$pluginsPath = $this->getPluginsFolder() . DIRECTORY_SEPARATOR;
$plugins = $this->config['plugins'];
foreach ($plugins as $plugin) {
$path = $pluginsPath . $plugin;
if (!file_exists($path)) {
throw new ModuleConfigException(__CLASS__, "The '{$plugin}' plugin file was not found in the {$pluginsPath} directory; this might be due to a wrong configuration of the `wpRootFolder` setting or a missing inclusion of one ore more additional config files using the `configFile` setting.");
continue;
}
require_once $path;
}
}