bbp_check_topic_tag_edit()

Redirect if unathorized user is attempting to edit a topic tag

Description

Source

File: bp-forums/topics/functions.php

3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
function bbp_check_topic_tag_edit() {
 
    // Bail if not editing a topic tag
    if ( !bbp_is_topic_tag_edit() )
        return;
 
    // Bail if current user cannot edit topic tags
    if ( !current_user_can( 'edit_topic_tags', bbp_get_topic_tag_id() ) ) {
        wp_safe_redirect( bbp_get_topic_tag_link() );
        exit();
    }
}

Changelog

Changelog
Version Description
bbPress (r3605) Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.