Timeline for Fatal error: Call to undefined function wp_create_nonce()
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 10, 2011 at 20:43 | vote | accept | Laxmidi | ||
| Oct 10, 2011 at 20:43 | comment | added | Laxmidi | I was thinking about doing that. I'll go ahead and post a new one. Thank you very much for the help! | |
| Oct 10, 2011 at 20:38 | comment | added | chrisguitarguy | Better ask that in a separate question. Maybe someone else has had a similar issue. | |
| Oct 10, 2011 at 20:20 | comment | added | Laxmidi | Hi, @Christopher Davis, Thank you very much for your message. You're right, I didn't have wp_localize_script inside a function. I never would have thought of your solution. I plopped it in a function and now I don't get the fatal error anymore. Unfortunately, I must have a second bug. I don't think that the nonce is being posted. Does this bit look correct: jQuery.post(the_ajax_script.ajaxurl, {my_nonce : the_ajax_script.my_nonce}, jQuery("#theForm").serialize()... Also, I tried putting an echo in php and alert on the js. It looks like the 2 numbers are different. Is this normal? Thank you. | |
| Oct 9, 2011 at 14:24 | history | answered | chrisguitarguy | CC BY-SA 3.0 |