bbp_check_topic_edit()
Redirect if unauthorized user is attempting to edit a topic
Description Description
Source Source
File: includes/topics/functions.php
function bbp_check_topic_edit() { // Bail if not editing a topic if ( ! bbp_is_topic_edit() ) { return; } // User cannot edit topic, so redirect back to topic if ( ! current_user_can( 'edit_topic', bbp_get_topic_id() ) ) { bbp_redirect( bbp_get_topic_permalink() ); } }
Changelog Changelog
Version | Description |
---|---|
2.1.0 | Introduced. |