[wp-trac] [WordPress Trac] #25669: Introduce helper function for AJAX checks

WordPress Trac noreply at wordpress.org
Thu Oct 24 04:26:31 UTC 2013


#25669: Introduce helper function for AJAX checks
-------------------------+------------------------------
 Reporter:  toscho       |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by rmccue):

 Yes please, and ideally filterable too. Constants are not a great way to
 check this really (I'm sure @bpetty will agree on that point), especially
 since AJAX calls can be made from other places.

 {{{
 function is_wp_ajax() {
         return apply_filters( 'is_wp_ajax', defined( 'DOING_AJAX' ) &&
 DOING_AJAX );
 }
 }}}

--
Ticket URL: <http://core.trac.wordpress.org/ticket/25669#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list