is_admin() returns true when using admin-ajax.php from front end script

Question

Had a situation today where I was using admin-ajax.php from a front end script. As I understand it this the wp way to make ajax calls (registering my function with the wp_ajax_nopriv_myfunction hook)

Seems to me that since admin-ajax.php is on the admin side is_admin() returns true whereas my script calls it from the front end side.

This causes an issue with a plugin I use that does things differently on front and admin side of things.

So I was wondering if I was doing something wrong

is there a way to use ajax in front end the wp way and have is_admin() to return false ?

hope I could make myself understand

0
, , Thomas 9 years 2012-06-19T07:24:50-05:00 0 Answers 79 views 0

Leave an answer

Browse
Browse