Support » Plugins » Hacks » Passing arguments to a ajax callback?

  • Hi,

    I’m trying to pass a value to an ajax call back. I have already tried:

    do_action('wp_ajax_update', 123 );
    add_action( 'wp_ajax_update', 'my_call_back', 10, 1 );

    and also

    do_action('update', 123 );
    add_action( 'wp_ajax_update', 'my_call_back', 10, 1 );

    but doesn’t work.

    Which is the correct way?

    Tnx!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Passing arguments to a ajax callback?’ is closed to new replies.