[wp-trac] [WordPress Trac] #11730: Should display a warning when processing a setting which is not registered

WordPress Trac wp-trac at lists.automattic.com
Sun Mar 21 18:57:43 UTC 2010


#11730: Should display a warning when processing a setting which is not registered
---------------------------------+------------------------------------------
 Reporter:  westi                |        Owner:  westi   
     Type:  feature request      |       Status:  reopened
 Priority:  normal               |    Milestone:  3.0     
Component:  Plugins              |      Version:  3.0     
 Severity:  normal               |   Resolution:          
 Keywords:  multisite has-patch  |  
---------------------------------+------------------------------------------

Comment(by nacin):

 add_option_whitelist() is used by option_update_filter() which is designed
 to append to the whitelist array any settings that have been registered.

 The settings appended are registered via register_setting() and its alias
 add_option_update_handler(), or unregistered via unregister_setting() or
 its alias remove_option_update_handler().

 Best I can tell, doing a just-in-time registration by hooking into the
 whitelisting filter is not the proper way to register, and that
 add_option_whitelist() is a function for internal use. I have tracked the
 code down to http://trac.mu.wordpress.org/changeset/1188 in trying to
 determine the intent here.

 In order to clean this up, we should make most of these private access,
 and deprecate the *_option_update_handler() functions in favor of
 register_setting() and unregister_setting().

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


More information about the wp-trac mailing list