[wp-hackers] Idea: Widgets as custom post types

Matt logikal16 at gmail.com
Thu Mar 4 13:17:38 UTC 2010


Are we planning on making a decision here, or is this more of a "WordPress
in an ideal world" discussion?

If we are planning on taking action, I agree with scribu, Austin, and Chris
Williams' points. Regardless of which table we store widgets in, I think it
can be agreed that widgets need to be treated like *REAL* content, and not
some serialized meta-garbage (as they currently are). If nothing else,
sticking widgets into the posts table makes them a lot more accessible to
the built-in search, if needed.

If you have 50 total text widgets on your site but are showing a page w/ 1
text widget, all 50 are getting loaded for that page regardless. That's
because WP needs to load the entire serialized string, de-serialize it, then
decide which widget(s) it needs. +1 on Austin's point of serialized data
getting easily corrupted.

I'll support WP regardless of the final decision, but we need to at least
get this ball rolling.

Matt

On Tue, Mar 2, 2010 at 10:05 PM, Dougal Campbell <dougal at gunters.org> wrote:

> On Mar 2 2010 4:50 PM, Brian Layman wrote:
>
>> [...] I really really wish we could have things like meta_key be a unique
>> value so
>>
>> that when I supply site_blog_meta_key the database is looking at one
>> specific unique value that it returns at near the speed of light. We're
>> way
>> past that point, but maybe we can stop adding even more generalization.
>>
>>
>
> In hindsight, I wish I *had* made the meta_key be unique. But at the time I
> wrote the postmeta feature, we didn't have the auto-serialization model in
> place. I wanted to be able to specify multiple values for the same key,
> without over-complicating the more common use-case of one-to-one key/value
> pairs.
>
> --
> Dougal Campbell <dougal at gunters.org>
> http://dougal.gunters.org/
> http://twitter.com/dougal
> http://twitual.com/
>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list