[wp-trac] [WordPress Trac] #14746: Post Kinds/Styles/Types
WordPress Trac
wp-trac at lists.automattic.com
Wed Sep 1 17:27:33 UTC 2010
#14746: Post Kinds/Styles/Types
-------------------------+--------------------------------------------------
Reporter: ryan | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Template | Version:
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Comment(by ryan):
We could turn this into a general template loading mechanism that would
replace Page Template. Register template files for a given query and
"type" setting. For page template back compat, we check the old meta
setting and see if the template there corresponds to a registered one.
For themes that use the registration API the Page Template headers could
be ignored so that we don't show both. Themes could remove the Page
Template headers once they are no longer concerned with < 3.1 back compat.
Some possible API:
{{{
// Register a template to be loaded for single queries for a particular
post type
// where the post has a given template_tag.
register_template_file($template_tag, $post_type, $file);
register_template('aside', array('description' => __('Short,
inconsequential statement about what you just ate.'), 'name' =>
__('Aside'), 'post_types' => array('post', 'page') );
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/14746#comment:37>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list