[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:02:51 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       |   Keywords:  has-patch
-------------------------+-----------------------------
 Currently in bp_locate_template(), we check for child and parent theme
 templates by looking up the directory with get_stylesheet_directory() and
 get_template_directory().

 We can just use locate_template() to do this.

 In the attached patch, I've also added two filters -
 `'bp_locate_fallback_template'` and `'bp_locate_template'`.  The
 `'bp_locate_fallback_template'` hook is necessary for 3rd-party plugin
 devs, while the `'bp_locate_template'` will open up the possibility for
 plugin devs to override any core template from their plugin.

 I'm open to removing the latter hook.

 Let me know what you guys think.

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


More information about the buddypress-trac mailing list