[ Index ]

PHP Cross Reference of BuddyPress

title

Body

[close]

/src/bp-forums/bbpress/ -> tag-remove.php (source)

   1  <?php
   2  
   3  require ( './bb-load.php' );
   4  
   5  bb_auth( 'logged_in' );
   6  
   7  $tag_id   = (int) @$_GET['tag'];
   8  $user_id  = (int) @$_GET['user'];
   9  $topic_id = (int) @$_GET['topic'];
  10  
  11  bb_check_admin_referer( 'remove-tag_' . $tag_id . '|' . $topic_id );
  12  
  13  $tag   = bb_get_tag ( $tag_id );
  14  $topic = get_topic  ( $topic_id );
  15  $user  = bb_get_user( $user_id );
  16  
  17  if ( !$tag || !$topic )
  18      bb_die( __( 'Invalid tag or topic.' ) );
  19  
  20  if ( false !== bb_remove_topic_tag( $tag_id, $user_id, $topic_id ) ) {
  21      if ( !$redirect = wp_get_referer() )
  22          $redirect = get_topic_link( $topic_id );
  23      bb_safe_redirect( $redirect );
  24  } else {
  25      bb_die( __( 'The tag was not removed.' ) );
  26  }
  27  
  28  exit;
  29  
  30  ?>


Generated: Thu Dec 7 01:01:35 2017 Cross-referenced by PHPXref 0.7.1