[wp-trac] [WordPress Trac] #12455: Options.php cleanup

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 2 11:14:03 UTC 2010


#12455: Options.php cleanup
--------------------------+-------------------------------------------------
 Reporter:  dd32          |       Owner:           
     Type:  defect (bug)  |      Status:  new      
 Priority:  normal        |   Milestone:  3.0      
Component:  General       |     Version:  3.0      
 Severity:  normal        |    Keywords:  has-patch
--------------------------+-------------------------------------------------
 The 2.9 options.php only contained 2 cases where exiting was required,
 Specifically, {{{if ( !current_user_can('manage_options') )}}} and if the
 whitelisted page was not available.

 trunk currently contains a few Multisite additions for death of the
 loading, Some of these apply to non-MS installs as well.

 Attached patch is an attempt at cleaning up some blocks of the code.
  * Consolidates wp_die()'s to the top of the file
    * Multisite checks allow for non-super-admins to update options, not to
 access the options.php page
  * Code formatting
  * Reduced if branching
  * Removes single-case switch in favour of if

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


More information about the wp-trac mailing list