How can I disable a plugin
-
Call toggle active then restart or reload nodebb.
var Plugins = require.main.require('./src/plugins'); var Meta = require.main.require('./src/meta'); var pluginid = 'nodebb-plugin-yourplugin'; Plugins.isActive(pluginid, function (err, isActive) { if (err) return console.log(err); if (isActive) Plugins.toggleActive(pluginid, Meta.restart); // or Meta.reload })
Copyright © 2024 NodeBB | Contributors