WikyBlog
Download

Plugins > Installation Scripts

Installation 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.

Installation

The 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

Upgrade

There 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.

Last modified 14:15 Wed, 26 Dec 2007 by Main. Accessed 1,337 times Children What Links Here share Share