I am a first time Kirby user, and not very PHP savvy. I need a functionality that strips Greek language accents from uppercase text.
I used the following code:
It’s strange that your templates work but the Panel doesn’t. Does the Panel work if you remove the plugin again? Otherwise it’s probably a different issue.
To answer the topic’s question: placing globally available functions in a “plugin” script is alright. Something like site/plugins/custom.php (but you can use any name).
Kirby will load any PHP script in the plugins directory:
site/plugins/custom.php // will be included
site/plugins/something_else.php // likewise
site/plugins/whatever.php // same
and if you use a sub-directory for your plugin, it will load the script that uses the same name as the sub-directory:
site/plugins/myplugin/myplugin.php // will be included automatically
site/plugins/myplugin/other.php // but not this one