[buddypress-trac] [BuddyPress] #2956: Use get_template_part instead of locate_template in BP Default

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Sat Dec 18 12:39:35 UTC 2010


#2956: Use get_template_part instead of locate_template in BP Default
--------------------------+-----------------------------
  Reporter:  sorich87     |      Owner:  sorich87
      Type:  enhancement  |     Status:  new
  Priority:  normal       |  Milestone:  Awaiting Review
 Component:  Theme        |    Version:  1.3
Resolution:               |   Keywords:
--------------------------+-----------------------------

Comment (by sbrajesh):

 As per #WP15086 , It is not yet officially supported and should be
 sometimes in the 3.2. Further, the loading of files from subdirectory is
 just a hacks as of now using get_template_part()(please see the php doc,
 it specifically mentions the file should be in the theme directory(until
 that ticket makes it into 3.2).
 From php doc for get_template_part()

 '' Includes the named template part for a theme or if a name is specified
 then a
  * specialised part will be included. If the theme contains no {slug}.php
 file
  * then no template will be included.''

 Also, since all these tickets you have specified are candidates for wp
 3.2, including them at the time when bp 1.3 is supposed to be working with
 wp 3.1 is not a very good idea.

 And as you say, If you want to hack using the die() and custom load
 function, I don't see anything which will stop you from applying a patch
 to locate_template for your install to allow you do it easily until they
 get it in 3.2.
 And just to clear my intentions, I am not advocating locate_template, It
 is just that currently, It suits better than get_template_part.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/2956#comment:7>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list