[wp-trac] [WordPress Trac] #7233: add filter to update_option to allow modifications to option prior to saving

WordPress Trac wp-trac at lists.automattic.com
Thu Jul 3 15:13:04 GMT 2008


#7233: add filter to update_option to allow modifications to option prior to
saving
----------------------------+-----------------------------------------------
 Reporter:  DD32            |       Owner:  anonymous
     Type:  defect          |      Status:  new      
 Priority:  normal          |   Milestone:  2.6      
Component:  Administration  |     Version:  2.6      
 Severity:  normal          |    Keywords:  has-patch
----------------------------+-----------------------------------------------
 At present, Its impossible to filter an option being updated, While there
 is an action which can be hooked to notify the option has changed, it
 cannot be modified directly.

 Attached is a patch which adds 'pre_update_option_<option_name>', It can
 be used in combination with a filter on get_option() to seemingly hide
 various portions of options to the rest of the WordPress admin (or theme,
 etc), and then add them back in if the option is modified.

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


More information about the wp-trac mailing list