[wp-trac] [WordPress Trac] #18331: Make get_header(), get_sidebar() and get_footer() use get_template_part()

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 16 23:13:50 UTC 2011


#18331: Make get_header(), get_sidebar() and get_footer() use get_template_part()
------------------------------+-----------------------
 Reporter:  Viper007Bond      |       Owner:
     Type:  enhancement       |      Status:  reopened
 Priority:  normal            |   Milestone:  3.3
Component:  Template          |     Version:  3.2.1
 Severity:  normal            |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------

Comment (by WraithKenny):

 Can we add $require_once to get_template_part to fix?
 {{{
 function get_template_part( $slug, $name = null, $require_once = false ) {
         do_action( "get_template_part_{$slug}", $slug, $name );

         $templates = array();
         if ( isset($name) )
                 $templates[] = "{$slug}-{$name}.php";

         $templates[] = "{$slug}.php";

         return locate_template($templates, true, $require_once);
 }
 }}}

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


More information about the wp-trac mailing list