[wp-hackers] Problem with admin AJAX not executing plugin code
Philip Walton
philip at philipwalton.com
Mon Apr 4 17:10:33 UTC 2011
On 4/4/11 8:27 AM, Dion Hulse (dd32) wrote:
> It sounds like you might need to re-adjust what hooks you're using for what
> processes.
>
> admin_menu should only be used for things like registering admin menu's (as
> thats what the hook is for) admin_init should be used for processing things
> for all admin requests, load-$pagenow hooks should be used for page-specific
> processing, etc..
>
> But you might also want to look into the DOING_AJAX constants which are set
> for ajax requests
Dion, you're right. I felt uncomfortable using admin_menu for that
purpose which is why I asked if you had another action recommendation.
And load-$pagenow is working perfectly, thanks!
More information about the wp-hackers
mailing list