[wp-trac] [WordPress Trac] #15327: Strip down admin-ajax.php to be a bare bones ajax handler.
WordPress Trac
wp-trac at lists.automattic.com
Thu Jan 26 18:47:45 UTC 2012
#15327: Strip down admin-ajax.php to be a bare bones ajax handler.
------------------------------------------------+------------------------
Reporter: westi | Owner: kurtpayne
Type: enhancement | Status: accepted
Priority: normal | Milestone: 3.4
Component: Administration | Version: 3.1
Severity: normal | Resolution:
Keywords: westi-likes has-patch dev-feedback |
------------------------------------------------+------------------------
Comment (by nacin):
Replying to [comment:28 sivel]:
> I kind of like the multidimensional array with both GET and POST in it,
using only a single if and single add_action. Performance testing over
100 result sets, shows a slight performance increase. The single array,
with single if and single add_action reduces the execution time by
0.0000379703 seconds. Small I know, but it all adds up.
The issue I found here is that it's actually a change in behavior.
You could send a POST request to admin-ajax.php?action=test, and
wp_ajax_test will fire, even though the request method is POST. I could
see someone potentially doing this in an ajax request in JS, accidentally,
or using wp_remote_post() instead of wp_remote_get().
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15327#comment:30>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list