diff --git src/bp-activity/classes/class-bp-activity-component.php src/bp-activity/classes/class-bp-activity-component.php
index e72d8460d..1d882f213 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 | 'favorites' => 'favorites', |
| 135 | 'mentions' => 'mentions', |
| 136 | ); |
| 137 | |
| 138 | if ( bp_is_active( 'friends' ) ) { |
| 139 | $filenames[bp_get_friends_slug()] = 'friends'; |
| 140 | } |
| 141 | |
| 142 | if ( bp_is_active( 'groups' ) ) { |
| 143 | $filenames[bp_get_groups_slug()] = 'groups'; |
| 144 | } |
| 145 | |
| 146 | // The slug is the current action requested. |
| 147 | $slug = bp_current_action(); |
| 148 | |
| 149 | if ( bp_is_user() && isset( $filenames[ $slug ] ) ) { |
| 150 | require $this->path . 'bp-activity/screens/' . $filenames[ $slug ] . '.php'; |
130 | 151 | } |
131 | 152 | |
132 | 153 | // Screens - Single permalink. |