[wp-hackers] Personal options
Michael D Adams
mikea at turbonet.com
Sun Aug 7 22:07:07 GMT 2005
I just thought of something else. Even for those options that don't
get table_prefixed, a plugin could create another option that *was*
prefixed which would override the "default" non-prefixed value
(assuming we automatically deprefix such options).
I have two blogs (wp_ and wp2_) that share the same users and
I set rich_editing = false for a particular user. Therefore,
rich_editing = false then applies to that user in both blogs.
The user wants rich_editing on for wp2_ but not for wp_.
I write a plugin for wp2_ that allows the user to easily set
wp2_rich_editing = true.
Now, when that user's user object gets created, WordPress will
automatically strip the wp2_ prefix from the wp2_rich_editing
meta_key and overwrites the value of rich_editing (the PHP variable -
no change to the DB) *only* when that user is working on wp2_.
The obvious alternative is to NOT share usermeta tables. I think,
though, that sharing usermeta makes sense in some situations (and
doesn't in others), so we should keep the option open. Another
alternative would be to have the plugin make WP listen to
prefix_rich_editing instead of rich_editing, but that's harder.
Anyway, I don't know how useful that is for rich_editing or for
anything else. That's just another nuance to the issue of "What
personal options, if any, should we table_prefix before storing them
in the DB, and should we automatically deprefix them when we pull
rich_editing does not need to be table_prefixed (other options may
need to be).
The code should automatically deprefix meta_keys for easier flexibility.
On Aug 7, 2005, at 2:31 PM, Michael D Adams wrote:
> We should probably also figure out what personal options need to
> get table_prefixed like user_level and capabilities do (all of
> them, none of them, some of them). We could automatically deprefix
> such prefixed meta_keys when they get pulled into a user object.
> On Aug 7, 2005, at 12:24 PM, Matthew Mullenweg wrote
>> So we have personal options now, what belongs there?
>> What options and functionality should be customizable on a per-
>> user level in addition to blog defaults (or instead of blog
More information about the wp-hackers