List of hooks

robiso edited this page Feb 27, 2018 · 7 revisions

Creating a plugin is easy

  • Each plugin has to be in it's own folder (
  • Each plugin can have unlimited number of files.
  • WonderCMS will automatically include your plugin and plugin files.

List of available hooks/listeners

  • Listeners are used for attaching your functions to different parts of WonderCMS.
  • These hooks can be used inside your plugin PHP files (
 wCMS::addListener('page', 'yourFunctionName'); // attach your function to the page
 wCMS::addListener('js', 'yourFunctionName'); // can be used for additional JavaScript
 wCMS::addListener('css', 'yourFunctionName'); // can be used for additional CSS
 wCMS::addListener('settings', 'yourFunctionName');
 wCMS::addListener('menu', 'yourFunctionName');
 wCMS::addListener('getMenuSettings', 'yourFunctionName');
 wCMS::addListener('footer', 'yourFunctionName');

Simple plugin example: hits counter plugin

How do I make my plugin downloadable by others?

  • Create a ZIP file of your plugin folder. If your plugin folder is "myAwesomePlugin", create a ZIP file of the "myAwesomePlugin" folder.
  • Upload ZIP file to GitHub (as a release file).
  • Anyone with your ZIP link will be able to install your plugin through the WonderCMS Settings panel.
Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.