PDA

View Full Version : Accessing hook parameters



finedesignz
02-25-10, 03:16 PM
Hi,

I know this is a newbie question, but I have searched the forum for a while and need a little boost.

Why can I not get this action hook to work?


<?php

function example($params)
{
echo "<pre>";
echo("Domain is: " .$params[0]['params']['domains']); // gives me "Domain is:"
echo"</pre>";
}
add_hook("AfterModuleCreate",50,"example");

?>

sparky
02-25-10, 11:56 PM
Try this... might make it easier for you


<?php

function example($params) {
$params = $params["params"];
echo "<pre>";
print_r($params);
echo"</pre>";
}
add_hook("AfterModuleCreate",50,"example");

?>