[wp-hackers] A third action for plugins

Stephen Rider wp-hackers at striderweb.com
Mon Nov 26 22:54:39 GMT 2007


Just a thought --

Would it be possible to modify the add_option function (and related)  
so that if a plugin adds a non-serialized Option-A, the function will  
say "this option is being added by Plugin XYZ" and automatically  
serialize it under plugin_XYZ_options[Option-A]?

This could be made backwards compatible by checking if an  
unserialized Option-A exists already, and convert it the first time  
it is called or modified.

Are there any situations we can think of where a plugin option _must  
not be_ serialized?

Stephen

On Nov 26, 2007, at 3:54 PM, Benedict Eastaugh wrote:

> Secondly, plugins can be very untidy and save a bunch of different
> options all over the options table, which is probably one of the
> reasons people feel the need to clean up the database. Once one starts
> providing a lot of options, a better way to do it might be serialising
> them and saving them in a single db entry.


More information about the wp-hackers mailing list