MDL-66340 setup: Add after_config for after setup.php is loaded

This commit is contained in:
Brendan Heywood
2019-08-27 13:24:15 +10:00
parent 0dca957716
commit 4ed105a9fd
+13
View File
@@ -1037,3 +1037,16 @@ if (false) {
$OUTPUT = new core_renderer(null, null);
$PAGE = new moodle_page();
}
// Allow plugins to callback as soon possible after setup.php is loaded.
$pluginswithfunction = get_plugins_with_function('after_config', 'lib.php');
foreach ($pluginswithfunction as $plugins) {
foreach ($plugins as $function) {
try {
$function();
} catch (Exception $e) {
debugging("Exception calling '$function'", DEBUG_DEVELOPER, $e->getTrace());
}
}
}