Skip to content

Node.js based forum software built for the modern web

revert: bring back backwards compat

Barış Soner Uşaklıa1c014462c23
diff --git a/src/plugins/index.js b/src/plugins/index.js
index 61d5730a40..eee74fa921 100644
--- a/src/plugins/index.js
+++ b/src/plugins/index.js
@@ -25,6 +25,13 @@ require('./usage')(Plugins);
Plugins.data = require('./data');
Plugins.hooks = require('./hooks');
+// Backwards compatibility for hooks, remove in v2.0.0
+Plugins.registerHook = Plugins.hooks.register;
+Plugins.unregisterHook = Plugins.hooks.unregister;
+Plugins.fireHook = Plugins.hooks.fire;
+Plugins.hasListeners = Plugins.hooks.hasListeners;
+// end
+
Plugins.getPluginPaths = Plugins.data.getPluginPaths;
Plugins.loadPluginInfo = Plugins.data.loadPluginInfo;