[buddypress-trac] [BuddyPress Trac] #6588: Members Type - needs a template stack hierarchy entry
buddypress-trac
noreply at wordpress.org
Wed Aug 12 17:37:50 UTC 2015
#6588: Members Type - needs a template stack hierarchy entry
--------------------------------+-----------------------
Reporter: hnla | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.4
Component: API - Theme Compat | Version:
Severity: normal | Keywords: has-patch
--------------------------------+-----------------------
We need to add a template path and file name to the stack for members
Directory
Currently as:
{{{
$new_templates = apply_filters( 'bp_template_hierarchy_members_directory',
array(
'members/index-directory.php'
) );
}}}
update to take into account the new Member Type directories if registered.
{{{
$new_templates = apply_filters( 'bp_template_hierarchy_members_directory',
array(
'members/index-type-' . sanitize_file_name( bp_get_current_member_type() )
. '.php',
'members/index-directory.php'
) );
}}}
Patch addresses this but I could only find `bp_get_current_member_type()`
to fetch the dir type being viewed but this doesn't feel right as it's
more an actual members tag although does work as expected to show
different templates matching to different member type dir urls.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6588>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list