troubleshooting Question

Strange use of WordPress add_action()

Avatar of steva
steva asked on
WordPress
2 Comments1 Solution73 ViewsLast Modified:
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
William Nettmann
PHP Web Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros