Theme idea - generic.php — at Initial Version
|Reported by:||johnjamesjacoby||Owned by:|
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?
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.