If you're using pm2 loader.js, you should use the restart button in the ACP to restart NodeBB...
I was dag nabbit.
(... or ideally, don't use PM2 at all, since the loader supercedes it. Just: ./nodebb start)
But I like to use pm2 because I use it for all of my other task management needs. Where in the code would it be?
If it helps you, I've started a plugin here:
It's still in development - I haven't had the capacity lately to finish it just yet. If anybody wants to take a crack at it though that would be awesome
even more, now the wordpress gallery shortcodes are supported, with the old post ids, i.e. [gallery ids="123,456,789"] shortcodes can be converted to, either, <img> tags, if you want a gallery plugin, you can then use @psychobunny's nodebb-plugin-gallery, or you can just convert the ids to full URLs which then you can use within your own plugin.
read this section for more details