[wp-trac] [WordPress Trac] #29724: register new content areas
WordPress Trac
noreply at wordpress.org
Mon Sep 22 05:31:27 UTC 2014
#29724: register new content areas
--------------------------------------+-----------------------------
Reporter: cramdesign | Owner:
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 4.0
Severity: normal | Keywords:
Focuses: administration, template |
--------------------------------------+-----------------------------
WordPress needs a better way to input different types of content into a
post. Using metadata is fine but has many limitations.
I suggest we consider something like registering content blocks much like
we register customizer controls, widget areas or menus, etc. Maybe
something like:
{{{
$wp_content->add_content($id, $args);
$wp_content->add_control($id, $args);
}}}
Then we could retrieve it with:
{{{
$wp_content->get_content($id);
}}}
or something of the sort. To maintain backwards compatibility,
`the_content()` would output all content blocks, in order, unless it was
specified that the block should not be output. When the content block is
registered, it could have properties that provided some control of how it
would be output for older themes including headings and classes.
I know that this need more fleshing out and thought, please forgive my
naivety. I would like a way to create content pages with more complex
data, much like using metaboxes, but it seems like it could be easier and
more elegant.
Side note. I tried to submit this to WordPress Ideas but the form would
not allow me to post.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29724>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list