Changeset 11703
- Timestamp:
- 09/27/2017 09:08:35 AM (7 years ago)
- Location:
- trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-admin.php
r11447 r11703 95 95 // @todo: Check if user is allowed to create new activity items 96 96 // if ( ! current_user_can( 'bp_new_activity' ) ) 97 if ( ! current_user_can( 'bp_moderate' ) )97 if ( ! bp_current_user_can( 'bp_moderate' ) ) 98 98 die( '-1' ); 99 99 -
trunk/src/bp-groups/bp-groups-admin.php
r11556 r11703 509 509 function bp_groups_admin_edit() { 510 510 511 if ( ! current_user_can( 'bp_moderate' ) )511 if ( ! bp_current_user_can( 'bp_moderate' ) ) 512 512 die( '-1' ); 513 513 … … 1097 1097 1098 1098 // Permission check. 1099 if ( ! current_user_can( 'bp_moderate' ) ) {1099 if ( ! bp_current_user_can( 'bp_moderate' ) ) { 1100 1100 return; 1101 1101 } … … 1212 1212 1213 1213 // Bail if user user shouldn't be here, or is a large network. 1214 if ( ! current_user_can( 'bp_moderate' ) || ( is_multisite() && wp_is_large_network( 'users' ) ) ) {1214 if ( ! bp_current_user_can( 'bp_moderate' ) || ( is_multisite() && wp_is_large_network( 'users' ) ) ) { 1215 1215 wp_die( -1 ); 1216 1216 } -
trunk/src/bp-groups/bp-groups-filters.php
r11299 r11703 310 310 function bp_groups_disable_at_mention_notification_for_non_public_groups( $send, $usernames, $user_id, BP_Activity_Activity $activity ) { 311 311 // Skip the check for administrators, who can get notifications from non-public groups. 312 if ( user_can( $user_id, 'bp_moderate' ) ) {312 if ( bp_user_can( $user_id, 'bp_moderate' ) ) { 313 313 return $send; 314 314 } -
trunk/src/bp-groups/bp-groups-template.php
r11661 r11703 2359 2359 if ( $user_id ) { 2360 2360 // Users with the 'bp_moderate' cap can always send invitations. 2361 if ( user_can( $user_id, 'bp_moderate' ) ) {2361 if ( bp_user_can( $user_id, 'bp_moderate' ) ) { 2362 2362 $can_send_invites = true; 2363 2363 } else { -
trunk/src/bp-groups/classes/class-bp-group-extension.php
r11554 r11703 809 809 810 810 // Always allow moderators to see nav items, even if explicitly 'noone' 811 if ( ( 'noone' !== $this->params['show_tab'] ) && current_user_can( 'bp_moderate' ) ) {811 if ( ( 'noone' !== $this->params['show_tab'] ) && bp_current_user_can( 'bp_moderate' ) ) { 812 812 return true; 813 813 } … … 830 830 831 831 // Always allow moderators to visit a tab, even if explicitly 'noone' 832 if ( ( 'noone' !== $this->params['access'] ) && current_user_can( 'bp_moderate' ) ) {832 if ( ( 'noone' !== $this->params['access'] ) && bp_current_user_can( 'bp_moderate' ) ) { 833 833 return true; 834 834 } -
trunk/src/bp-groups/classes/class-bp-groups-group.php
r11604 r11703 1766 1766 * 1767 1767 * Will include hidden groups in the count only if 1768 * current_user_can( 'bp_moderate' ).1768 * bp_current_user_can( 'bp_moderate' ). 1769 1769 * 1770 1770 * @since 1.6.0 -
trunk/src/bp-members/classes/class-bp-members-admin.php
r11447 r11703 1198 1198 1199 1199 // Permission check. 1200 if ( ! current_user_can( 'bp_moderate' ) && $user_id != bp_loggedin_user_id() ) {1200 if ( ! bp_current_user_can( 'bp_moderate' ) && $user_id != bp_loggedin_user_id() ) { 1201 1201 return; 1202 1202 }
Note: See TracChangeset
for help on using the changeset viewer.