bbp_check_topic_tag_edit

Redirect if unathorized user is attempting to edit a topic tag.

Description

bbp_check_topic_tag_edit(); 

Usage

  1. if ( !function_exists( 'bbp_check_topic_tag_edit' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'bbpress/includes/topics/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bbp_check_topic_tag_edit(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/includes/topics/functions.php  
  1. function bbp_check_topic_tag_edit() { 
  2.  
  3. // Bail if not editing a topic tag 
  4. if ( !bbp_is_topic_tag_edit() ) 
  5. return; 
  6.  
  7. // Bail if current user cannot edit topic tags 
  8. if ( !current_user_can( 'edit_topic_tags', bbp_get_topic_tag_id() ) ) { 
  9. wp_safe_redirect( bbp_get_topic_tag_link() ); 
  10. exit();