Skip to content

Node.js based forum software built for the modern web

moved comments above method

barisusaklifdbd9a816f57
diff --git a/src/plugins/hooks.js b/src/plugins/hooks.js
index eea9f773c1..63f9126678 100644
--- a/src/plugins/hooks.js
+++ b/src/plugins/hooks.js
@@ -5,6 +5,12 @@ var winston = require('winston'),
module.exports = function(Plugins) {
+ /*
+ `data` is an object consisting of (* is required):
+ `data.hook`*, the name of the NodeBB hook
+ `data.method`*, the method called in that plugin
+ `data.priority`, the relative priority of the method when it is eventually called (default: 10)
+ */
Plugins.registerHook = function(id, data, callback) {
function register() {
Plugins.loadedHooks[data.hook] = Plugins.loadedHooks[data.hook] || [];
@@ -14,12 +20,6 @@ module.exports = function(Plugins) {
callback();
}
}
- /*
- `data` is an object consisting of (* is required):
- `data.hook`*, the name of the NodeBB hook
- `data.method`*, the method called in that plugin
- `data.priority`, the relative priority of the method when it is eventually called (default: 10)
- */
var method;