Ticket #5684: tagbulk.diff
File tagbulk.diff, 1.4 KB (added by , 17 years ago) |
---|
-
opt/www/eclipsework/WPDev/wp-admin/edit-tags.php
38 38 39 39 break; 40 40 41 case 'bulk-delete': 42 check_admin_referer('bulk-tags'); 43 44 if ( !current_user_can('manage_categories') ) 45 wp_die(__('Cheatin’ uh?')); 46 47 $tags = $_POST['delete_tags']; 48 foreach( $tags as $tag_ID ) { 49 wp_delete_term( $tag_ID, 'post_tag'); 50 } 51 52 wp_redirect('edit-tags.php?message=6'); 53 exit; 54 55 break; 56 41 57 case 'edit': 42 58 43 59 require_once ('admin-header.php'); … … 76 92 $messages[3] = __('Tag updated.'); 77 93 $messages[4] = __('Tag not added.'); 78 94 $messages[5] = __('Tag not updated.'); 95 $messages[6] = __('Tags deleted.'); 79 96 ?> 80 97 81 98 <?php if (isset($_GET['message'])) : ?> … … 100 117 101 118 <form name="deletetags" id="deletetags" action="" method="post"> 102 119 <?php wp_nonce_field('bulk-tags'); ?> 120 <input type="hidden" name="action" value="bulk-delete" /> 103 121 <table class="widefat"> 104 122 <thead> 105 123 <tr> … … 122 140 ?> 123 141 </tbody> 124 142 </table> 143 <p class="submit"><input type="submit" class="button" name="deletetags" id="deletetags" value="<?php _e('Delete Checked Tags »') ?>" onclick="return confirm('<?php echo js_escape(__("You are about to delete these tags permanently.\n'Cancel' to stop, 'OK' to delete.")); ?>')" /></p> 125 144 </form> 126 145 <?php 127 146