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

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

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

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

//plugin function with argument(s) which are sent from application
function args($time) {
	return "Clock: $time h<br />";

//add hook, where to execute a function

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