Skip to:
Content

bbPress.org

Changeset 7158


Ignore:
Timestamp:
11/05/2020 10:28:01 PM (9 months 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 trunk, for 2.7. Fixes #3309.

Props dd32, man4toman.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/template.php

    r7144 r7158  
    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.