Right now for my plugin, I am using
in_admin() to determine if the user is in the frontend of the site or in the admin area. However, the problem occurs when plugins use
admin_ajax.php to process ajax requests.
I need a way to register hooks and plugins only when processing
admin_ajax.php or in the frontend of the site. What is the best way to go about doing that?