[buddypress-trac] [BuddyPress] #4726: Bad titles on directories pages (issue in bp_get_name_from_root_slug)

buddypress-trac noreply at wordpress.org
Wed Dec 19 09:32:04 UTC 2012


#4726: Bad titles on directories pages (issue in bp_get_name_from_root_slug)
--------------------------+-----------------------------
 Reporter:  slaFFik       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:  1.6.1
 Severity:  major         |   Keywords:
--------------------------+-----------------------------
 If you create a page called Community (for example) and then create
 Activity, Members etc pages and assign them to appropriate directory -
 BuddyPress will work fine (I mean users/groups links etc).
 But {{{bp_get_name_from_root_slug()}}} will return false.

 Reason - {{{$bp->{$component}->root_slug}}} will use part of url (like
 community/activity), while {{{bp_current_component()}}} will return just
 {{{$bp->{$component}->slug}}}. They are not equal and
 {{{bp_get_name_from_root_slug()}} -> false.

 This problem prevents from translating title on directories pages.
 {{{
 $title = sprintf( __( '%s Directory', 'buddypress' ),
 bp_get_name_from_root_slug() );
 }}}
 This actually will be just {{{ Directory}}}

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


More information about the buddypress-trac mailing list