[wp-trac] [WordPress Trac] #20509: Theme idea - generic.php

WordPress Trac wp-trac at lists.automattic.com
Sun Jun 10 20:05:57 UTC 2012


#20509: Theme idea - generic.php
--------------------------------------+------------------------------
 Reporter:  johnjamesjacoby           |       Owner:
     Type:  feature request           |      Status:  new
 Priority:  normal                    |   Milestone:  Awaiting Review
Component:  Themes                    |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  needs-patch dev-feedback  |
--------------------------------------+------------------------------

Comment (by scribu):

 To maybe simplify discussion, what we're trying to implement here is
 called template inheritance in Django:

 > Template inheritance allows you to build a base "skeleton" template that
 contains all the common elements of your site and defines blocks that
 child templates can override.

 https://docs.djangoproject.com/en/1.4/topics/templates/#template-
 inheritance

 And the central idea is that a plugin cannot define a generic skeleton
 template, so it has to rely on the theme to do that. It can only fill in
 the content block.

 That's why I asked what you meant by plugin-{slug}.php:

  * If you mean an additional skeleton template, that defeats the point
  * If you mean the name of a content block, it would be pretty rigid to
 only allow a single block per plugin.

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


More information about the wp-trac mailing list