[wp-hackers] Best practices for plugin with complicated settings?
John James Jacoby
in at j-3.me
Mon Jul 26 07:45:02 UTC 2010
Agree with Westi 100%
BuddyPress is a great example of this already, as is WordPress.
Make yourself a default constants file and make sure it can be filtered.
Will save on serializing and/or caching the 4k back and forth when 1 small
If you want to keep it configurable, save only the settings that differ from
default, and wp_parse_args them at runtime?
From: wp-hackers-bounces at lists.automattic.com
[mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Peter Westwood
Sent: Monday, July 26, 2010 3:38 AM
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Best practices for plugin with complicated
On Mon, July 26, 2010 8:11 am, Carl Roett wrote:
> My team is currently working on the BuddyPress Media plugin
> http://code.google.com/p/buddypress-media/ (previously known as BP
> At present, we have 207 configuration settings consisting of mixed data
> types (bool, int, string, object) that we're storing to a single WP
> This number is probably going to increase to around 400 settings by the
> we're finished. Total stored size in the DB about 4K. The settings rarely
> change after the admin has completed initial setup.
My first response to this is - Do you /really/ need that many user
Consider making some decisions about how the plugin should work and more
some of them to only be configurable using filters so that in the rare
case where someone does need to change one of those settings they still
wp-hackers mailing list
wp-hackers at lists.automattic.com
More information about the wp-hackers