Link to home
Create AccountLog in
Avatar of steva
steva

asked on

Strange use of WordPress add_action()

I expect add_action() to specify a hook name and then a function to call when the hook fires, but I came across the text below in "WordPress Web Application Development, 2nd ed on page 29:

 “We need to define AJAX handler functions using the WordPress add_action function:
add_action( ‘wp_ajax_mark_answer_status’, ‘wpwa_mark_answer_status’ );

There's no existing hook with the name "wp_ajax_mark_answer_status" so could someone explain what's going on?

Thanks for your help.
ASKER CERTIFIED SOLUTION
Avatar of William Nettmann
William Nettmann
Flag of South Africa image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of steva
steva

ASKER

Thank you!