bbp_check_reply_edit()
Redirect if unauthorized user is attempting to edit a reply
Description Description
Source Source
File: includes/replies/functions.php
function bbp_check_reply_edit() {
// Bail if not editing a topic
if ( ! bbp_is_reply_edit() ) {
return;
}
// User cannot edit topic, so redirect back to reply
if ( ! current_user_can( 'edit_reply', bbp_get_reply_id() ) ) {
bbp_redirect( bbp_get_reply_url() );
}
}
Changelog Changelog
| Version | Description |
|---|---|
| 2.1.0 | Introduced. |