Return to Snippet

Revision: 49791
at July 29, 2011 23:34 by redconservatory


Updated Code
/* 
Plugin Name: NAME-GOES-HERE
Plugin URI: LINK-TO-THE-PLUGIN-WEBSITE
Description: DESCRIPTION
Author: AUTHOR
Version: VERSION
Author URI: LINK TO AUTHOR'S WEBSITE
*/

// On activation, do the following
function activation_handler() {
	// create database or tables
	// create options
}

register_activation_hook(__FILE__, "activation_handler");

// Handle plugin deactivate
function deactivate_handler() {
	// clean up
}

register_deactivation_hook(__FILE__, "deactivation_handler");

Revision: 49790
at July 29, 2011 23:32 by redconservatory


Updated Code
/* 
Plugin Name: NAME-GOES-HERE
Plugin URI: LINK-TO-THE-PLUGIN-WEBSITE
Description: DESCRIPTION
Author: AUTHOR
Version: VERSION
Author URI: LINK TO AUTHOR'S WEBSITE
*/

Activation code for wordpress plugins

function activation_handler() {
	// create database or tables
	// create options
}

regiter_activation_hook(__FILE__, "activation_handler");

Revision: 49789
at July 29, 2011 23:06 by redconservatory


Initial Code
/* 
Plugin Name: NAME-GOES-HERE
Plugin URI: LINK-TO-THE-PLUGIN-WEBSITE
Description: DESCRIPTION
Author: AUTHOR
Version: VERSION
Author URI: LINK TO AUTHOR'S WEBSITE
*/

Initial URL


Initial Description
plugins reside in the plugins folder
wp-content/plugins

The following code must go at the top of your plugin file

Initial Title
Wordpress: Plugin code

Initial Tags
wordpress

Initial Language
Other