[wp-trac] [WordPress Trac] #14746: Post Kinds/Styles/Types

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 7 16:50:58 UTC 2010


#14746: Post Kinds/Styles/Types
----------------------------+-----------------------------------------------
 Reporter:  ryan            |       Owner:     
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  3.1
Component:  Template        |     Version:     
 Severity:  normal          |    Keywords:     
----------------------------+-----------------------------------------------

Comment(by ryan):

 Breaking it down. Core stuff and then extra stuff that can be added if
 desired.

  * Register a new default taxonomy
  * Create some agreed upon terms in that taxonomy during install
  * Mark these terms for translation with some dummy gettext calls. This
 way they get into the default catalog and each theme does not have to
 provide translations.

 That would be the bare bones, which leaves all UI and heavy lifting to
 themes.

 Adding on:

  * Inject the "template" slug into get_post_class() "template-$slug"
  * Add has_post_template() and get_post_template() for wrapping up the
 taxonomy API calls.
  * Add a template registration API for use by themes.  Allows auto
 building a selection UI that can be included in the post edit screen.
  * Load template files based on template slug.  Themes register template
 files against a combination of post type and template slug.  Selection UI
 can be built based on registration.
  * Deprecate the Page Template feature in favor of the above, which is
 more consistent (themes register against agreed upon terms rather than
 store theme specific file names in post meta), more flexible (the template
 slug can be used for template loading,  post classes, or whatever the
 theme wants), and is i18n friendly (unlike having strings in the theme
 header).
  * Allow slug -> file registration and loading for any post type. Don't
 restrict it to pages as Page Templates currently are.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14746#comment:42>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list