[wp-trac] [WordPress Trac] #15086: get_template_part() should let you specify a directory

WordPress Trac wp-trac at lists.automattic.com
Mon Oct 11 19:12:39 UTC 2010


#15086: get_template_part() should let you specify a directory
---------------------------+------------------------------------------------
 Reporter:  aaroncampbell  |       Owner:             
     Type:  defect (bug)   |      Status:  new        
 Priority:  normal         |   Milestone:  3.1        
Component:  Themes         |     Version:  3.0        
 Severity:  normal         |    Keywords:  needs-patch
---------------------------+------------------------------------------------

Comment(by aaroncampbell):

 The patch is a quick and dirty example of what I mean.  The real question
 I still have is how we should go about using remove_dot_segments().  It's
 currently part of Simple Pie, so I'm wondering if we should just pull it
 out and put it in wp-includes/formatting.php (I think we're keeping up
 Simple Pie ourselves now right?), or if there's a better way.

 Also, @Viper007Bond, the reason to still split $slug is to remove the
 directory from it.  It makes it so you have to put the directory as the
 third parameter OR as part of the slug, but not both.  Also, I ended up
 using substr to grab the parts of the string I need.  Maybe explode would
 be better, but I'm not sure.

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


More information about the wp-trac mailing list