[wp-hackers] DOING_AJAX all the time

Tom Barrett tcbarrett at gmail.com
Mon Jan 30 15:09:11 UTC 2012


What happens if you do this:

<?php echo 'DOING_AJAX: ' . ( (defined('DOING_AJAX') && DOING_AJAX) ? 'yes'
: 'no' ); exit; ?>

On 30 January 2012 14:57, Steve Taylor <steve at sltaylor.co.uk> wrote:

> I have a site in development that seems to think it's DOING_AJAX all
> the time. There are AJAX aspects to the front-end, but even non-AJAX
> requests seem to have this flag set.
>
> So, if I put this line in header.php, functions.php, a plugin:
>
> <?php echo 'DOING_AJAX: ' . ( DOING_AJAX ? 'yes' : 'no' ); exit; ?>
>
> Even if I just make a plain request to a page in the browser, I get:
>
> DOING_AJAX: yes
>
> I'm rushed so I'm heading for a workaround for now - just wondered if
> anyone had any ideas?
>
> Needless to say I've double-checked for the constant being defined,
> and it's only in admin-ajax.php. Any idea how this may be being
> included on a normal request?
>
> Thanks,
>
> Steve Taylor
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
http://www.tcbarrett.com | http://gplus.to/tcbarrett |
http://twitter.com/tcbarrett


More information about the wp-hackers mailing list