User Menu
Keywords
WikyBlog.com
gpEasy CMS
Sponsored Links
|
Plugins > Installation ScriptsInstallation and Upgrade Scripts can be added to your plugin in the config.php file. Similarly to maintenance scripts, adding these scripts is as simple as showing which file to include. InstallationThe installation script will be run after the normal plugin installation scripts have finished. config.php<?php defined('WikyBlog') or die('Not an entry point...'); $installScript = 'install.php'; install.php<?php defined('WikyBlog') or die('Not an entry point...'); ... your code UpgradeThere are two options for upgrade scripts: $upgradeScriptBefore and $upgradeScriptAfter. As you might imagine, the script referenced by $upgradeScriptBefore is run before normal plugin upgrade and $upgradeScriptAfter is run after. |