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

WordPress Trac wp-trac at lists.automattic.com
Sat Apr 21 23:39:55 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:  dev-feedback     |
-----------------------------+------------------------------
Description changed by johnjamesjacoby:

Old description:

> Problem: How do plugins that introduce completely new functionality (I.E.
> BuddyPress/bbPress) interface with themes, without needing to move
> template files directly into a theme's folder?
>
> Solution: generic.php
>
> ---
>
> generic.php would be a template file that includes skeletal styling of
> the theme. In place of the content and the comment logic, is an action;
> for the sake of discussion, let's name this action 'generic_content'
>
> A concept file is attached for twentyeleven.
>
> This type of ability would help prevent a ton of additional processing
> that plugins currently need to do to hi-jack the_content output and noop
> the comment stream, in situations where a plugin needs to output HTML
> into the main content area of a theme.
>
> Rather than guessing at template names, and hoping 'page.php' or
> 'index.php' will be close enough, a convention of having themes come with
> a dedicated template for plugin compatibility would be incredibly
> helpful.
>
> BuddyPress components have a similar convention already, with a
> plugin.php having only the header, footer, sidebar, and generic action in
> them.
>
> The use case is currently small, and there's very little (if anything)
> needed in WordPress core to make this work. Wanted to post the idea here
> to get some developer talk going, and get opinions on other possible
> approaches.

New description:

 Problem: How do plugins that introduce completely new functionality (I.E.
 BuddyPress/bbPress) interface with themes, without needing to move
 template files directly into a theme's folder?

 Solution: generic.php

 ----

 generic.php would be a template file that includes skeletal layout of the
 theme. In place of the content and the comment logic, is an action; for
 the sake of discussion, let's name this action 'generic_content'

 A concept file is attached for twentyeleven.

 This type of ability would help prevent a ton of additional processing
 that plugins currently need to do to hi-jack the_content output and noop
 the comment stream, in situations where a plugin needs to output HTML into
 the main content area of a theme.

 Rather than guessing at template names, and hoping 'page.php' or
 'index.php' will be close enough, a convention of having themes come with
 a dedicated template for plugin compatibility would be incredibly helpful.

 BuddyPress components have a similar convention already, with a plugin.php
 having only the header, footer, sidebar, and generic action in them.

 The use case is currently small, and there's very little (if anything)
 needed in WordPress core to make this work. Wanted to post the idea here
 to get some developer talk going, and get opinions on other possible
 approaches.

--

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


More information about the wp-trac mailing list