static function register_module($module, $priority = 10)
{
$filepath = static::get_root_dir("modules/{$module}/{$module}.php");
if (self::is_development()) {
if (!is_file($filepath)) {
WPLib::trigger_error(sprintf(__('Module %s file %s does not exist.', 'wplib'), $module, $filepath));
}
if (isset(self::$_modules[$priority][$module])) {
WPLib::trigger_error(sprintf(__('Module %s already registered.', 'wplib'), $module));
}
}
self::$_modules[$priority][$module] = $filepath;
}