Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/05/2020 10:26:37 PM (3 years ago)
Author:
johnjamesjacoby
Message:

Replies: Allow moderators to reply to pending topics.

This commit adds a check inside of bbp_current_user_can_access_create_reply_form() for the edit_topic capability, and if the user is capable will now allow them to access that form.

This will come in particularly handy for forum moderators who want to reply to topics before they are approved, or to provide a reason to the original poster why a topic will not be approved but without making it public.

In branches/2.6, for 2.6.6. See #3309.

Props dd32, man4toman.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.6/src/includes/users/template.php

    r7143 r7157  
    23002300
    23012301    // User can edit this reply
    2302     } else {
     2302    } elseif ( bbp_get_reply_id() ) {
    23032303        $retval = current_user_can( 'edit_reply', bbp_get_reply_id() );
     2304
     2305    // User can edit this topic
     2306    } elseif ( bbp_get_topic_id() ) {
     2307        $retval = current_user_can( 'edit_topic', bbp_get_topic_id() );
    23042308    }
    23052309
Note: See TracChangeset for help on using the changeset viewer.