[buddypress-trac] [BuddyPress] #4630: Problem with bp_get_name_from_root_slug()
buddypress-trac
noreply at wordpress.org
Mon Oct 29 20:36:32 UTC 2012
#4630: Problem with bp_get_name_from_root_slug()
--------------------------+-----------------------------
Reporter: DanielJuhl | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Core | Version: 1.6.1
Severity: major | Keywords:
--------------------------+-----------------------------
I'm not sure about this, but as far as I can see there is a problem with
this function in BuddyPress v1.6.1.
Right now the page title for the activity directory is simply: "
Directory" instead of "Activity Directory".
Line 717 in bp-core/bp-core-template.php
{{{
// Loop through active components and look for a match
foreach ( $bp->active_components as $component => $id ) {
if ( !empty( $bp->{$component}->root_slug ) && (
$bp->{$component}->root_slug == $root_slug ) ) {
return $bp->{$component}->name;
}
}
}}}
I have a couple of danish installations, and I have created WordPress
pages with danish slugs for each component directory and then linked them
the settings page.
The problem is then that if I print a $bp->{$component} I see that the
root_slug contains the actual root slug used on my site but $root_slug
contains the default system slug.
In other words the activity directory would in the above case have:
'activity' == $root_slug
But $bp->{$component}->root_slug would containg "aktiviteter", and
"activity" would be in $bp->{$component}->slug
So maybe the code should be changed to, at least that solved my problem:
{{{
// Loop through active components and look for a match
foreach ( $bp->active_components as $component => $id ) {
if ( !empty( $bp->{$component}->slug ) && (
$bp->{$component}->slug == $root_slug ) ) {
return $bp->{$component}->name;
}
}
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4630>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list