Location: PHPKode > scripts > Simple Hooks Plugin > simple-hooks-plugin/plugins/plugin1.plugin.php
<?php

//set plugin id as file name of plugin
$plugin_id = basename(__FILE__);

//some plugin data
$data['name'] = "First plugin";
$data['author'] = "Nemanja";
$data['url'] = "http://www.instant-update.com/";

//register plugin to SHP
register_plugin($plugin_id, $data);

//plugin function
function testfunc() {
	echo 'echoed from plugin<br />';
}

//add hook, where to execute a function
add_hook('test','testfunc');

//code to execute when loading plugin
echo "<p>Plugin 1 LOADED!</p>";
?>
Return current item: Simple Hooks Plugin