[ Root ] [ Search ] [ Index ]

PHP Cross Reference of bbPress Trunk

Provided by Yoast

title

Body

[close]

/bb-admin/ -> tag-destroy.php (source)

   1  <?php
   2  require ('admin.php');
   3  
   4  if ( !bb_current_user_can('manage_tags') )
   5      bb_die(__('You are not allowed to manage tags.'));
   6  
   7  $tag_id = (int) $_POST['id' ];
   8  
   9  bb_check_admin_referer( 'destroy-tag_' . $tag_id );
  10  
  11  $old_tag = bb_get_tag( $tag_id );
  12  if ( !$old_tag )
  13      bb_die(__('Tag not found.'));
  14  
  15  if ( $destroyed = bb_destroy_tag( $tag_id ) ) {
  16      printf(__("Rows deleted from tags table: %d <br />\n"), $destroyed['tags']);
  17      printf(__("Rows deleted from tagged table: %d <br />\n"), $destroyed['tagged']);
  18      printf(__('<a href="%s">Home</a>'), bb_get_uri());
  19  } else {
  20     die(printf(__("Something odd happened when attempting to destroy that tag.<br />\n<a href=\"%s\">Try Again?</a>"), wp_get_referer()));
  21  }
  22  ?>


Generated: Mon Nov 15 04:45:27 2010 Cross-referenced by PHPXref 0.7