Difference between revisions of "Anatomy of a Plugin"
From LabTrove Documentation
m (2 revisions imported)
Latest revision as of 17:07, 31 July 2017
If you want to build a complex plugin you should use thr following structure:
- README.txt - Explains the functionality of the plugin.
- VERSION.txt - Version information about the plugin.
- install.sh - Installer for plugin.
- install.sql - Tables and rows to be created when installing the plugin.
- uninstall.sh - Uninstaller for plugin.
- uninstall.sql - Tables to be dropped when uninstalling the plgin.
- scripts/ - Scripts that the plugin runs.
- docs/ - installer will copy this directory to /docs/<PLUGIN_NAME>.
- plugin.php - Functions for plugin and hook function definitions. All functions should start with <PLUGIN_NAME>.
- config_template.php - Template configuration for the plugin. Installer will use this to create config.php with specific configuration.