[buddypress-trac] [BuddyPress Trac] #4639: Add template hierarchy support

buddypress-trac noreply at wordpress.org
Sun May 22 12:26:06 UTC 2016


#4639: Add template hierarchy support
-----------------------------------------+---------------------------
 Reporter:  DJPaul                       |       Owner:  boonebgorges
     Type:  enhancement                  |      Status:  closed
 Priority:  high                         |   Milestone:  1.8
Component:  Appearance - Template Parts  |     Version:  1.7
 Severity:  normal                       |  Resolution:  fixed
 Keywords:  needs-patch                  |
-----------------------------------------+---------------------------
Changes (by egyptimhotep):

 * keywords:  has-patch => needs-patch
 * priority:  normal => high


Comment:

 We should add member type also.

 {{{#!php
 <?php
 // Setup our templates based on priority
 $new_templates = apply_filters(
 'bp_template_hierarchy_members_single_item', array(
         'members/single/index-id-'        . sanitize_file_name(
 bp_displayed_user_id() ) . '.php',
         'members/single/index-nicename-'  . sanitize_file_name(
 $user_nicename )         . '.php',
         'members/single/index-membertype-'  . sanitize_file_name(
 bp_get_member_type(bp_displayed_user_id())). '.php',
         'members/single/index-action-'    . sanitize_file_name(
 bp_current_action() )    . '.php',
         'members/single/index-component-' . sanitize_file_name(
 bp_current_component() ) . '.php',
         'members/single/index.php'
 ) );
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4639#comment:54>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list