[wpmu-trac] [WordPress MU Trac] #675: Add filters to get_site_option() function to allow mu-plugins to override site options?

WordPress MU Trac wpmu-trac at lists.automattic.com
Fri Jul 11 02:10:28 GMT 2008


#675: Add filters to get_site_option() function to allow mu-plugins to override
site options?
--------------------------+-------------------------------------------------
 Reporter:  jamescollins  |       Owner:  somebody
     Type:  enhancement   |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  component1    |     Version:          
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 The get_option($setting) function in WordPress allows plugin to short
 circuit options with the pre_option_$setting filter:

 {{{
 // Allow plugins to short-circuit options.
 $pre = apply_filters( 'pre_option_' . $setting, false );
 }}}

 It also allows the option's value to be overridden as the value is
 returned:

 {{{
 return apply_filters( 'option_' . $setting, maybe_unserialize( $value ) );
 }}}

 Could similar functionality please be added to the get_site_option() WPMU
 function (in wp-includes/wpmu-functions.php)?

 This would allow mu-plugins to filter get_site_option() calls.

 An example use of this could be to let certain users upload special file
 types (by using custom filters on the get_site_option('upload_filetypes')
 ).

 I can submit a patch if required.

 Thanks.

-- 
Ticket URL: <http://trac.mu.wordpress.org/ticket/675>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser


More information about the wpmu-trac mailing list