- Timestamp:
- 08/22/2019 10:03:17 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/classes/class-bp-activity-component.php
r12087 r12449 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
Note: See TracChangeset
for help on using the changeset viewer.