Changeset 11269
- Timestamp:
- 12/05/2016 10:26:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-members/bp-members-functions.php
r11256 r11269 1475 1475 */ 1476 1476 function bp_core_can_edit_settings() { 1477 $status = false; 1478 1477 1479 if ( bp_is_my_profile() ) { 1478 return true; 1479 } 1480 1481 if ( is_super_admin( bp_displayed_user_id() ) && ! is_super_admin() ) { 1482 return false; 1483 } 1484 1485 if ( bp_current_user_can( 'bp_moderate' ) || current_user_can( 'edit_users' ) ) { 1486 return true; 1487 } 1488 1489 return false; 1480 $status = true; 1481 } elseif ( is_super_admin( bp_displayed_user_id() ) && ! is_super_admin() ) { 1482 $status = false; 1483 } elseif ( bp_current_user_can( 'bp_moderate' ) || current_user_can( 'edit_users' ) ) { 1484 $status = true; 1485 } 1486 1487 /** 1488 * Filters the status of whether the logged-in user can edit settings for the displayed user or not. 1489 * 1490 * @since 2.8.0 1491 * 1492 * @param bool True if editing is allowed, otherwise false. 1493 */ 1494 return apply_filters( 'bp_core_can_edit_settings', $status ); 1490 1495 } 1491 1496
Note: See TracChangeset
for help on using the changeset viewer.