Registering multiple plugin roots

Hi,

How can i register plugins from multiple paths, for ex:

  • App plugins: /site/plugins
  • Theme plugins: /theme/plugins
  • Payment gateways: /gateways/plugins/

Or:

  • App plugins: /plugins/site
  • Theme plugins: /plugins/theme
  • Payment gateways: /plugins/gateways

Is this possible register multiple folders?
Thanks

You can’t register multiple plugin roots, but you could create a “loader” plugin in site/plugins/loader/index.php that then loads the plugins from the other directories with require_once(). Kirby doesn’t do anything else internally either.

2 Likes

Thank you. I have created new plugin about that :slight_smile: