We all love the Wordpress plugins system. The ability to define hooks that get called when particular actions happen and ability to pass through arguments as well? Recently while helping out Chris Baines with Dove Forums talk of a plugins system like Wordpress arose and so in a couple of hours work I’ve developed one.
It’s sort of alpha and sort of beta. You can define actions and then trigger them in your application, your plugin functions are called. Creating plugins is in-fact so close to Wordpress that if you can create Wordpress plugins, you can use this library.
Feel free to fork and make it better. It’s still early days, but it works. Check it out on the Github repository I created here. The repository has information on using it, but there is no documentation for this library yet as things keep changing.
The basics of this are:
* Autoload the library.
* Register action hooks by using the add_action() function.
* Trigger actions by run_action()
That’s basically it, see the repo for more info.