How I send the arguments to functions in a plugin? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: Developer Discussions (http://get-simple.info/forums/forumdisplay.php?fid=8) +--- Thread: How I send the arguments to functions in a plugin? (/showthread.php?tid=1052) |
How I send the arguments to functions in a plugin? - Alessio_roma - 2010-10-14 The same of the topic title,I'm developing a guestbook plugin, i have wrote many functions but i don't understand how send the arguments to functions from the add_action.Variables are declared at the beginning of the file after the comments and i tryed add_action ('content-bottom','my_function',$firstvariable,$secondvariable) but does not work. How I send the arguments to functions in a plugin? - Zegnåt - 2010-10-14 Try passing them as an array: Code: add_action('content-bottom','my_function',array($firstvariable,$secondvariable)); If it still doesn’t, are any errors returns with debug mode on? How I send the arguments to functions in a plugin? - Alessio_roma - 2010-10-15 Thanks,now it works. I have a question: I have developed a first version of my plugin,it work correctly but there isn't many functions that i'm developing.Can I upload this version? How I send the arguments to functions in a plugin? - ccagle8 - 2010-10-15 upload it here and people will gladly test it for you. Once it's stable, i would suggest uploading it to Extend. |