GetSimple Support Forum

Full Version: How I send the arguments to functions in a plugin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
Try passing them as an array:
Code:
add_action('content-bottom','my_function',array($firstvariable,$secondvariable));
This should work.

If it still doesn’t, are any errors returns with debug mode on?
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?
upload it here and people will gladly test it for you. Once it's stable, i would suggest uploading it to Extend.