[wp-trac] [WordPress Trac] #2888: New function to reset vars

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 1 03:56:33 GMT 2006

#2888: New function to reset vars
 Reporter:  Sewar         |       Owner:  anonymous
     Type:  enhancement   |      Status:  new      
 Priority:  normal        |   Milestone:  2.1      
Component:  Optimization  |     Version:  2.1      
 Severity:  normal        |    Keywords:           
 Most files in wordpress/wp-admin/*.php start with 15-lines-code to reset
 vars in an array. So, just move this code to new function and put it in
 admin-functions.php. This is better than write same code in +10 files.

 In the patch i used $_REQUEST because it contain both of $_POST and $_GET,
 this will offer some lines. Also, the var unseted according to #2595.

 Also, isn't "foreach" better than "for"? or at least more cleaner?

Ticket URL: <http://trac.wordpress.org/ticket/2888>
WordPress Trac <http://wordpress.org/>
WordPress blogging software

More information about the wp-trac mailing list