| @@ -168,8 +168,12 @@ | ||
| 168 | 168 | 'reply' => bbp_get_reply_to_link( $r ), |
| 169 | 169 | ], $r['id'] ); |
| 170 | 170 | } |
| 171 | 171 | |
| 172 | + if ( bbp_get_user_role( get_current_user_id() ) === bbp_get_participant_role() ) { | |
| 173 | + unset( $r['links']['edit'] ); | |
| 174 | + } | |
| 175 | + | |
| 172 | 176 | // See if links need to be unset |
| 173 | 177 | $reply_status = bbp_get_reply_status( $r['id'] ); |
| 174 | 178 | if ( in_array( $reply_status, [ bbp_get_spam_status_id(), bbp_get_trash_status_id(), bbp_get_pending_status_id() ], true ) ) { |
| 175 | 179 | |
| @@ -270,8 +274,12 @@ | ||
| 270 | 274 | 'spam' => bbp_get_topic_spam_link( $r ), |
| 271 | 275 | 'approve' => bbp_get_topic_approve_link( $r ), |
| 272 | 276 | 'reply' => bbp_get_topic_reply_link( $r ), |
| 273 | 277 | ], $r['id'] ); |
| 278 | + } | |
| 279 | + | |
| 280 | + if ( bbp_get_user_role( get_current_user_id() ) === bbp_get_participant_role() ) { | |
| 281 | + unset( $r['links']['edit'] ); | |
| 274 | 282 | } |
| 275 | 283 | |
| 276 | 284 | // See if links need to be unset |
| 277 | 285 | $topic_status = bbp_get_topic_status( $r['id'] ); |