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

Matt logikal16 at gmail.com
Fri Mar 5 15:55:53 UTC 2010


Stephen,

The content vs. structure argument can go both ways. Text widgets contain
*content* that you manage through WordPress. Before this discussion spirals,
I agree that wp_posts isn't the best place to put widgets.

My point from earlier was that I'd prefer them *not* be stored as a big
serialized string.

Widgets don't really fit into the posts table (as you and Otto mentioned),
and I dislike the possibility of wp_posts columns being re-purposed to store
data it wasn't meant to handle. Creating a wp_widgets table sounds
reasonable.

BTW, since you're adamant against storing structure in wp_posts, what are
your thoughts on how the new menu system stores its data?

Matt

On Thu, Mar 4, 2010 at 9:21 PM, Stephen Rider <wp-hackers at striderweb.com>wrote:

>
> On Mar 4, 2010, at 3:04 PM, scribu wrote:
>
> > I plan to open a ticket once we discuss more about the best way to store
> > widget instances individually.
> >
> > Since I suppose a wp_widgets table is out of the question, I don't see a
> > better place than the wp_posts table.
>
> Why is a widgets table out of the question?
>
> I'm not agreeing with the push to treat widgets as a type of post.  They
> aren't data -- they're structure.  In essence they're part of the theme if
> nothing else.  A very flexible part of the theme, but still -- part of the
> theme.
>
> They're not content, they're structure.  Treat it as what it is.
>
> FWIW.
>
> Stephen
>
>
> --
> Stephen Rider
> http://striderweb.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