scbFramework: How to use scbFramework in your plugins
Before making this framework public, I used to include the files with each plugin. As the number of plugins increased, I had to update each one every time I modified the framework.
After a while, I found a way to make all plugins on an instalation use the most recent framework version installed. This didn’t help much.
Finally, I made it a standalone plugin which you only need to install once.
So, currently, there are two possibilities:
As long as the scbFramework plugin is activated, your plugin will work perfectly. If you want to spare users from ugly error messages, you can include a small file, called scb-check.php. It will check that scbFramework is installed and if not, it will deactivate your plugin and display a friendly notice with an install link.
Including class files
If you don’t want to require users to install the standalone plugin, you can include all the class files with your plugin. You will also want to include another file, called load.php that takes care of autoloading classes as needed. (It will have to be placed in the same directory as the class files)
You can see a usage example by looking at the Front-end Editor plugin.comments powered by Disqus