[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
Wed Jan 18 23:06:14 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:  Future
Component:  Administration                      |  Release
 Severity:  normal                              |     Version:  3.1
 Keywords:  westi-likes has-patch dev-feedback  |  Resolution:
------------------------------------------------+--------------------------

Comment (by kurtpayne):

 [[attachment:15327.2.patch]] moves everything to a separate file (wp-
 admin/includes/admin-actions.php, name and location are debatable) and
 makes admin-ajax a very generic (36 lines!) ajax entry point.

 Each case statement became a new function and was hooked to the
 appropriate "wp_ajax_[hookname]" hook.  I scanned with "phpmd ...
 unusedcode" to look for any unused local variables to ensure no globals
 were missed in the transition.

 Should be good for 3.4 (pending other supporters?)

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


More information about the wp-trac mailing list