diff --git src/bp-activity/classes/class-bp-activity-component.php src/bp-activity/classes/class-bp-activity-component.php
index e72d8460d..dae9e88d9 100644
|
|
class BP_Activity_Component extends BP_Component { |
124 | 124 | require $this->path . 'bp-activity/screens/just-me.php'; |
125 | 125 | } |
126 | 126 | |
127 | | // Screens - User secondary nav. |
128 | | if ( bp_is_user() && in_array( bp_current_action(), array( 'friends', 'groups', 'favorites', 'mentions' ), true ) ) { |
129 | | require $this->path . 'bp-activity/screens/' . bp_current_action() . '.php'; |
| 127 | /** |
| 128 | * Screens - User secondary nav. |
| 129 | * |
| 130 | * For these specific actions, slugs can be customized using `BP_{COMPONENT}_SLUGS`. |
| 131 | * As a result, we need to map filenames with slugs. |
| 132 | */ |
| 133 | $filenames = array( |
| 134 | bp_get_friends_slug() => 'friends', |
| 135 | bp_get_groups_slug() => 'groups', |
| 136 | 'favorites' => 'favorites', |
| 137 | 'mentions' => 'mentions', |
| 138 | ); |
| 139 | |
| 140 | // The slug is the current action requested. |
| 141 | $slug = bp_current_action(); |
| 142 | |
| 143 | if ( bp_is_user() && isset( $filenames[ $slug ] ) ) { |
| 144 | require $this->path . 'bp-activity/screens/' . $filenames[ $slug ] . '.php'; |
130 | 145 | } |
131 | 146 | |
132 | 147 | // Screens - Single permalink. |