[buddypress-trac] [BuddyPress] #4546: Use locate_template() in bp_locate_template()

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Wed Sep 19 19:57:45 UTC 2012


#4546: Use locate_template() in bp_locate_template()
-----------------------------------+------------------------------
 Reporter:  r-a-y                  |       Owner:
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Core                   |     Version:  1.7
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------------------
Changes (by r-a-y):

 * keywords:  has-patch 2nd-opinion reporter-feedback => has-patch 2nd-
               opinion


Comment:

 I started looking at the theme-compat code this morning so I'm still a
 little green! :)

 > I don't think the extra hook at the end is necessary, as hooks already
 exist to add additional templates in the stack.

 Yeah, I wasn't really sure about the last hook as well.  But, I think the
 first hook - `bp_locate_fallback_template` - is valid as I currently don't
 see a way for 3rd-party plugin devs to use `bp_get_template_part()` in
 their own templates without it failing in `bp_locate_template()`.  Unless
 I'm not looking in the right place?

 > Being able to see the stack of child, parent, theme-compat reads easier
 than using locate_template().

 I don't really mind which way we go here.  If we want to utilize WP code
 as much as possible, then we should use `locate_template()`, however I do
 see your point about having to adapt to WP if they decide to change that
 function.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4546#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list