How to upgrade Kirb 2 plugins
Adapt your existing plugins to Kirby 3's new plugin system.
The biggest change for plugins is a new way how to define plugins. All plugins are now defined by the
$kirby→set() is deprecated and no longer works.
The biggest advantage of this new definition syntax is a more consistent way of defining multiple plugin types and also composer compatibility.
Kirby::plugin('superwoman/superplugin', [ 'tags' => [ ... ], 'fields' => [ ... ] 'fieldMethods' => [ ... ] // etc. ]);
In Kirby 3 this happens in
/site/plugins/MY-PLUGIN/index.php where you define your plugin parts via
Kirby::plugin() as well as add any helper functions or similar that your plugin requires.
Please check out the plugin docs for more information on the plugin definition and each plugin type:
These plugin types just need to be converted to the new wrapper syntax:
These plugin types have no chance of being converted without rewriting them from scratch.