[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
Thu Sep 15 12:54:49 UTC 2011


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

Comment (by westi):

 Replying to [comment:21 scribu]:
 > {{{
 > if ( 'header' == $slug || 'sidebar' == $slug || 'footer' == $slug )
 >     do_action( "get_$slug", $name );
 > }}}
 >
 > I don't see any benefit in that.

 I wouldn't put these checks in every call to get_template_part.

 If we want to slim the functions down more we could create a function to
 fire the action and hook it onto the action in get_template_part that is
 fired in these three cases.

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


More information about the wp-trac mailing list