[wp-trac] [WordPress Trac] #35669: Store widgets in a custom post type instead of options
WordPress Trac
noreply at wordpress.org
Thu Aug 18 22:11:34 UTC 2016
#35669: Store widgets in a custom post type instead of options
--------------------------+------------------------------
Reporter: westonruter | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Widgets | Version: 2.8
Severity: normal | Resolution:
Keywords: dev-feedback | Focuses:
--------------------------+------------------------------
Comment (by PeterRKnight):
Replying to [comment:4 MattyRob]:
> First I need to admit that I'm obsessive about my WordPress databases
and I like to keep them just so.
>
> Reading this ticket sent me into a panic that more 'non-post' stuff is
going to be stored in the wp_posts table.
>
> If this does get implement please, please, please can you keep the
current system as a fallback and implement some sort of filter so I can
keep my Widgets out of my post table.
>
> I think for me the issue is that the wp_posts table is now poorly named
and used for stuff it was not originally intended for. (I actually
implement my nav menus though code to keep entries out of the database!)
To extend on the reality that the wp_posts table really effectively an
alias for wp_objects, if you are a fan of the databases, you should be
rejoiced. Currently widgets are stored in the options table, which is not
a great fit. Widgets define content after all and most options are
autoloaded on every page load. As custom post objects the widgets can take
advantage of post type-like features, such as authorship, scheduling,
revisions etc.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35669#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list