-
-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should load_plugins() only load plugin_name.php? #203
Comments
i've done this with a plugin.yaml description file im my case only the plugin with this file are loaded. here is my modified function if it can help :
Look how many pull-request are waiting , there is an issue about a new maintainer or active team for Pico. Nobody 'll never pull anything ... |
Ideas about how to achieve this in a backwards-compatible manner are appreciated! I though about this with Pico 1.0/#252 too, but didn't found a satisfying solution. Please also note that we don't want to increase complexity (at least not considerable; "stupidly simple"). |
We'll very likely implement this with Pico 2.0, see #317. |
I'm writing a plugin, and have found that any .php files in the plugin directory get loaded (by include()). I realise this is a change to the way Pico loads plugins, but I don't think it should do this. I'd favour only loading one file (probably a .php file with the same name as the plugin, eg.
plugins/my_plugin/my_plugin.php
). That one file should then do any include() it needs on any other PHP files.My primary motivation is that I'd like to use an external PHP library to provide me with some functionality in some cases. Having Pico load it for me means it has to be loaded on every page view, which adds to response time and memory requirement unnecessarily. If my plugin can load it when required, then it only affects the page views that need it.
If this idea sounds useful/sensible/helpful, I'll produce a patch/pull request for it (all the fun is in the load_plugins() method, line 115 or so).
The text was updated successfully, but these errors were encountered: