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

Mike Schinkel mikeschinkel at newclarity.net
Tue Mar 2 20:38:21 UTC 2010


Speaking 2nd hand for Matt, he told me at WordCamp Birmingham that he wanted to see the Links table go away and have links moved to posts because of all the things you get "for free" with the posts table (tags, categories, custom fields, et. al.)  

So +1

-Mike

On Mar 2, 2010, at 3:20 PM, Justin Shreve wrote:

> I agree it's a good idea as well.
> 
> I know that links has it's own table but if we are using wp_posts as a way
> to store this different data wouldn't it make sense to have them stored as a
> post_type of 'link'? Some similar data is stored here as well.
> 
> On Tue, Mar 2, 2010 at 3:13 PM, Austin Matzko <austin at ilfilosofo.com> wrote:
> 
>> On Tue, Mar 2, 2010 at 2:07 PM, scribu <scribu at gmail.com> wrote:
>>> Currently, each widget type has a an associated row in the wp_options
>> table,
>>> where all instances of itself are stored.
>>> 
>>> Taking example from the nav menus in WP 3.0, why not store each widget in
>>> the wp_posts table, with a post_type of 'widget' ?
>> 
>> I think it's a good idea, and the post db structure fits many widgets
>> too, since they often have titles and content.  And I hate how easily
>> serialized data gets corrupted.
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>> 
> _______________________________________________
> 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