[wp-trac] [WordPress Trac] #25255: Extend admin-ajax to detect multiple user capability and admin-ajax.php does not return 0

WordPress Trac noreply at wordpress.org
Mon Sep 9 12:46:21 UTC 2013


#25255: Extend admin-ajax to detect multiple user capability and admin-ajax.php
does not return 0
--------------------------------+------------------------------
 Reporter:  godhulii_1985       |       Owner:
     Type:  enhancement         |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  General             |     Version:  3.6
 Severity:  normal              |  Resolution:
 Keywords:  close dev-feedback  |
--------------------------------+------------------------------

Comment (by godhulii_1985):

 Replying to [comment:3 rmccue]:
 > I disagree that WordPress needs the built-in capability to handle this.
 Different people use different methods to encode the data that they pass
 back, so there's no way of standardising the handling here (e.g. JSON, URL
 encoding, HTML, etc).

 What I wanted:
 * Do not let every user to call every ajax function I've written => I am
 using built-in capability check to distinguish users and it can be
 standardizing just like menu/submenu page handling. Currently wordpress
 distinguish logged in and logged out users, I wanted beyond that (separate
 in logged in users also).
 * Data handling => Sorry for the confusion, I did not ask about
 standardizing how developer should echo/print their code. Marko has
 mentioned the problem more precisely that if we have reached to line-77 in
 [http://core.trac.wordpress.org/browser/trunk/src/wp-admin/admin-ajax.php]
 then it does imply developer forgot to kill code and he is not aware about
 this. In my case, I got my expected result with HTTP-200 header followed
 by a zero that totally confused me.

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


More information about the wp-trac mailing list