Changeset 5834 for trunk/src/includes/topics/capabilities.php
- Timestamp:
- 07/15/2015 03:59:23 PM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/topics/capabilities.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/capabilities.php
r5770 r5834 58 58 * @uses get_post() To get the post 59 59 * @uses get_post_type_object() To get the post type object 60 * @uses bbp_get_public_status_id() To get the public status id 61 * @uses bbp_is_user_forum_mod() To check if the user is a forum moderator 62 * @uses bbp_get_topic_forum_id() To get the opic forum id 60 63 * @uses apply_filters() Filter capability map results 64 * 61 65 * @return array Actual capabilities for meta capability 62 66 */ … … 150 154 // Unknown, so map to edit_others_posts 151 155 } else { 152 $caps[] = $post_type->cap->edit_others_posts; 156 157 // If user is a per-forum moderator, make sure they can spectate. 158 if ( bbp_is_user_forum_mod( $user_id, bbp_get_topic_forum_id( $_post->ID ) ) ) { 159 $caps = array( 'spectate' ); 160 161 // Fallback to edit_others_posts. 162 } else { 163 $caps[] = $post_type->cap->edit_others_posts; 164 } 153 165 } 154 166 }
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)