finedesignz Posted February 25, 2010 Share Posted February 25, 2010 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"); ?> 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted February 26, 2010 Share Posted February 26, 2010 Try this... might make it easier for you [color=#000000] [color=#0000BB]<?php [/color][color=#007700]function [/color][color=#0000BB]example[/color][color=#007700]([/color][color=#0000BB]$params[/color][color=#007700]) { [/color][/color]$params = $params["params"]; [color=#000000][color=#007700] echo [/color][color=#DD0000]"<pre>"[/color][color=#007700]; print_r($params);[/color][color=#FF8000] [/color][color=#007700]echo[/color][color=#DD0000]"</pre>"[/color][color=#007700]; } [/color][color=#0000BB]add_hook[/color][color=#007700]([/color][color=#DD0000]"AfterModuleCreate"[/color][color=#007700],[/color][color=#0000BB]50[/color][color=#007700],[/color][color=#DD0000]"example"[/color][color=#007700]); [/color][color=#0000BB]?>[/color] [/color] 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.