[wp-hackers] Talking to Ajax

Rafael Ehlers rafaehlers at gmail.com
Sat Mar 31 02:54:04 UTC 2012


This screencast talks about the exactly issue your on:
http://pippinsplugins.com/plugin-thoughts-episode-4-learn-how-core-does-it/

,please watch!

On Fri, Mar 30, 2012 at 11:44 PM, Dino Termini <dino at duechiacchiere.it>wrote:

> Hello list,
>
> I am developing a plugin that displays a bunch of meta boxes. I'm trying
> to do something when the 'Show on screen' checkbox for the corresponding
> meta box is (un)selected. So I added
>
> add_action('wp_ajax_closed-**postboxes',  'closed_postboxes');
>
> and
>
> function closed_postboxes(){
>        echo 'yeah';
> }
>
> to test it. But according to Firebug, admin-ajax.php returns -1, and the
> hook is not executed. What am I missing? I found this page
>
> http://codex.wordpress.org/**AJAX_in_Plugins<http://codex.wordpress.org/AJAX_in_Plugins>
>
> Can you please point me in the right direction?
>
> Cheers,
> Dino.
> ______________________________**_________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists.automattic.com/mailman/listinfo/wp-hackers>
>


More information about the wp-hackers mailing list