mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
Merge branch 'master' into develop
This commit is contained in:
@@ -78,6 +78,13 @@ module.exports = function (Plugins) {
|
||||
}
|
||||
};
|
||||
|
||||
Plugins.unregisterHook = function (id, hook, method) {
|
||||
var hooks = Plugins.loadedHooks[hook] || [];
|
||||
Plugins.loadedHooks[hook] = hooks.filter(function (hookData) {
|
||||
return hookData && hookData.id !== id && hookData.method !== method;
|
||||
});
|
||||
};
|
||||
|
||||
Plugins.fireHook = function (hook, params, callback) {
|
||||
callback = typeof callback === 'function' ? callback : function () {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user