public function _initialize()
{
$wpRootFolder = $this->config['wpRootFolder'];
if (!is_dir($wpRootFolder)) {
throw new ModuleConfigException(static::class, 'WordPress root folder is not a folder');
}
if (!is_readable($wpRootFolder)) {
throw new ModuleConfigException(static::class, 'WordPress root folder is not readable');
}
$wpLoad = $wpRootFolder . DIRECTORY_SEPARATOR . 'wp-load.php';
if (!file_exists($wpLoad)) {
throw new ModuleConfigException(static::class, 'WordPress root folder does not contain a wp-load.php file');
}
if (!is_readable($wpLoad)) {
throw new ModuleConfigException(static::class, 'wp-load.php file is not readable');
}
$this->wpLoadPath = $wpLoad;
}