I would put this inside the plugin file. At the end. Usually stuff at `core` are meant to be re-used by more than one plugin.