MDL-79011 core: Convert after_config callback to hook
This commit is contained in:
+3
-10
@@ -1195,13 +1195,6 @@ if (false) {
|
||||
initialise_local_config_cache();
|
||||
|
||||
// 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 (Throwable $e) {
|
||||
debugging("Exception calling '$function'", DEBUG_DEVELOPER, $e->getTrace());
|
||||
}
|
||||
}
|
||||
}
|
||||
$afterconfighook = new \core\hook\after_config();
|
||||
$afterconfighook->process_legacy_callbacks();
|
||||
\core\di::get(\core\hook\manager::class)->dispatch($afterconfighook);
|
||||
|
||||
Reference in New Issue
Block a user