## Is there builtin way to use protected AJAX endpoint?

Question

Usually I declare "protected" endpoints as this. So logged in users can use this endpoint.

add_action( 'wp_ajax_my_action', 'my_action_callback' );


Is there a way to make it only accessible to administrators (and not other users)?

0
2 months 2022-04-28T12:26:33-05:00 0 Answers 0 views 0