Changeset 11577
- Timestamp:
- 06/06/2017 05:46:13 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-messages/classes/class-bp-messages-component.php
r11360 r11577 205 205 ); 206 206 207 $sub_nav[] = array( 208 'name' => __( 'Compose', 'buddypress' ), 209 'slug' => 'compose', 210 'parent_url' => $messages_link, 211 'parent_slug' => $slug, 212 'screen_function' => 'messages_screen_compose', 213 'position' => 30, 214 'user_has_access' => $access 215 ); 216 217 if ( bp_current_user_can( 'bp_moderate' ) ) { 207 // Show certain screens only if the current user is the displayed user. 208 if ( bp_is_my_profile() ) { 209 210 // Show "Compose" on the logged-in user's profile only. 218 211 $sub_nav[] = array( 219 'name' => __( ' Notices', 'buddypress' ),220 'slug' => ' notices',212 'name' => __( 'Compose', 'buddypress' ), 213 'slug' => 'compose', 221 214 'parent_url' => $messages_link, 222 215 'parent_slug' => $slug, 223 'screen_function' => 'messages_screen_notices', 224 'position' => 90, 225 'user_has_access' => true 226 ); 216 'screen_function' => 'messages_screen_compose', 217 'position' => 30, 218 'user_has_access' => $access 219 ); 220 221 /* 222 * Show "Notices" on the logged-in user's profile only 223 * and then only if the user can create notices. 224 */ 225 if ( bp_current_user_can( 'bp_moderate' ) ) { 226 $sub_nav[] = array( 227 'name' => __( 'Notices', 'buddypress' ), 228 'slug' => 'notices', 229 'parent_url' => $messages_link, 230 'parent_slug' => $slug, 231 'screen_function' => 'messages_screen_notices', 232 'position' => 90, 233 'user_has_access' => true 234 ); 235 } 227 236 } 228 237
Note: See TracChangeset
for help on using the changeset viewer.