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

WordPress Trac wp-trac at lists.automattic.com
Wed Apr 25 11:18:44 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  |
--------------------------------------+------------------------------
Changes (by scribu):

 * keywords:  dev-feedback => needs-patch dev-feedback


Comment:

 Actually, that's not the main idea, but it's a possibility:

 {{{
 add_action( 'generic_content', function() {
   echo '<h1>My Plugin</h1>';

   if ( get_query_var( 'my_plugin_list' ) )
     $specific_template = 'my-plugin-list.php';
   else
     $specific_template = 'my-plugin-table.php';


   locate_template( array( $specific_template, 'my-plugin.php' ), true );
 }
 }}}

 I think it's time for someone to write a patch, to move the process along.

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


More information about the wp-trac mailing list