Changeset 6921 for trunk/src/includes/replies/capabilities.php
- Timestamp:
- 11/07/2019 06:56:53 PM (7 years ago)
- File:
-
- 1 edited
-
trunk/src/includes/replies/capabilities.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/replies/capabilities.php
r6783 r6921 154 154 } elseif ( ! is_admin() && ( (int) $user_id === (int) $_post->post_author ) ) { 155 155 156 // Only allow if not past the edit-lock period 157 $caps = ! bbp_past_edit_lock( $_post->post_date_gmt ) 158 ? array( $post_type->cap->edit_posts ) 159 : array( 'do_not_allow' ); 156 // If editing... 157 if ( bbp_is_reply_edit() ) { 158 159 // Only allow if not past the edit-lock period 160 $caps = ! bbp_past_edit_lock( $_post->post_date_gmt ) 161 ? array( $post_type->cap->edit_posts ) 162 : array( 'do_not_allow' ); 163 164 // Otherwise... 165 } else { 166 $caps = array( $post_type->cap->edit_posts ); 167 } 160 168 161 169 // Fallback to edit_others_posts.
Note: See TracChangeset
for help on using the changeset viewer.