diff --git wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php
index eea74abe1..fc9516eae 100644
|
|
class Moderators { |
21 | 21 | add_filter( 'bbp_map_primary_meta_caps', array( $this, 'map_meta_caps' ), 10, 4 ); |
22 | 22 | add_action( 'bbp_post_request', array( $this, 'edit_user_handler' ), 0 ); |
23 | 23 | |
| 24 | // Allow moderators to reply to closed topics (marked as spam for instance) |
| 25 | add_filter( 'bbp_current_user_can_access_create_reply_form', array ( $this, 'allow_create_reply_form_access' ), 10 ); |
| 26 | |
24 | 27 | // Append 'view=all' to forum, topic, and reply URLs in moderator views. |
25 | 28 | add_filter( 'bbp_get_forum_permalink', array( $this, 'add_view_all' ) ); |
26 | 29 | add_filter( 'bbp_get_topic_permalink', array( $this, 'add_view_all' ) ); |
… |
… |
class Moderators { |
1020 | 1023 | public function store_moderator_username( $post_id ) { |
1021 | 1024 | update_post_meta( $post_id, self::MODERATOR_META, wp_get_current_user()->user_nicename ); |
1022 | 1025 | } |
| 1026 | |
| 1027 | /** |
| 1028 | * Allow moderators to reply to closed topics (e.g. marked as spam) |
| 1029 | * |
| 1030 | * @param bool $retval |
| 1031 | * @return bool |
| 1032 | */ |
| 1033 | public function allow_create_reply_form_access( $retval ) { |
| 1034 | return current_user_can( 'moderate' ) || $retval; |
| 1035 | } |
1023 | 1036 | } |