PDA

View Full Version : [Docs] Plugin Dependencies - Plugin A requires Plugin B



Nick
07-16-2009, 06:29 AM
With plugins playing such a large role in Hotaru CMS, it's important that they play nicely with each other.

If your plugin relies on other plugins to function, specify them with "requires: " in the comments section at the top of your plugin file. E.g:



<?php
/**
* name: Example plugin
* description: Doesn't do anything
* version: 0.1
* folder: example
* class: ExamplePlugin
* requires: submit 0.1, users 0.1
* hooks: install_plugin, theme_index_top
*/
Important!

The "requires: " line should be a comma-separated list of plugin_folder *space* plugin_version pairs.

If your plugin doesn't require any other plugins, don't include "requires: ". An empty "requires: " will generate an error.