Changeset 5700
- Timestamp:
- 06/14/07 02:25:30 (1 year ago)
- Files:
-
- trunk/wp-admin/edit-pages.php (modified) (1 diff)
- trunk/wp-admin/export.php (modified) (1 diff)
- trunk/wp-admin/import/blogger.php (modified) (1 diff)
- trunk/wp-admin/import/mt.php (modified) (1 diff)
- trunk/wp-admin/import/utw.php (modified) (10 diffs)
- trunk/wp-admin/import/wordpress.php (modified) (3 diffs)
- trunk/wp-admin/import/wp-cat2tag.php (modified) (7 diffs)
- trunk/wp-admin/includes/bookmark.php (modified) (1 diff)
- trunk/wp-admin/includes/file.php (modified) (1 diff)
- trunk/wp-admin/includes/image.php (modified) (1 diff)
- trunk/wp-admin/includes/plugin.php (modified) (1 diff)
- trunk/wp-admin/includes/schema.php (modified) (1 diff)
- trunk/wp-admin/includes/template.php (modified) (2 diffs)
- trunk/wp-admin/includes/theme.php (modified) (1 diff)
- trunk/wp-admin/includes/upgrade.php (modified) (5 diffs)
- trunk/wp-admin/link-import.php (modified) (1 diff)
- trunk/wp-admin/moderation.php (modified) (10 diffs)
- trunk/wp-admin/options-general.php (modified) (1 diff)
- trunk/wp-admin/options.php (modified) (1 diff)
- trunk/wp-admin/plugins.php (modified) (1 diff)
- trunk/wp-admin/widgets.php (modified) (19 diffs)
- trunk/wp-app.php (modified) (2 diffs)
- trunk/wp-content/themes/default/sidebar.php (modified) (2 diffs)
- trunk/wp-includes/author-template.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (6 diffs)
- trunk/wp-includes/bookmark.php (modified) (2 diffs)
- trunk/wp-includes/category-template.php (modified) (6 diffs)
- trunk/wp-includes/class-IXR.php (modified) (1 diff)
- trunk/wp-includes/class-phpmailer.php (modified) (31 diffs)
- trunk/wp-includes/class-smtp.php (modified) (3 diffs)
- trunk/wp-includes/classes.php (modified) (1 diff)
- trunk/wp-includes/cron.php (modified) (2 diffs)
- trunk/wp-includes/formatting.php (modified) (1 diff)
- trunk/wp-includes/functions.php (modified) (3 diffs)
- trunk/wp-includes/general-template.php (modified) (5 diffs)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyGoogleSpell.class.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/classes/TinyPspellShell.class.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/plugins/spellchecker/tinyspell.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/tiny_mce_config.php (modified) (1 diff)
- trunk/wp-includes/js/tinymce/tiny_mce_gzip.php (modified) (1 diff)
- trunk/wp-includes/kses.php (modified) (1 diff)
- trunk/wp-includes/link-template.php (modified) (7 diffs)
- trunk/wp-includes/locale.php (modified) (2 diffs)
- trunk/wp-includes/pluggable.php (modified) (14 diffs)
- trunk/wp-includes/post-template.php (modified) (3 diffs)
- trunk/wp-includes/post.php (modified) (9 diffs)
- trunk/wp-includes/query.php (modified) (2 diffs)
- trunk/wp-includes/rewrite.php (modified) (1 diff)
- trunk/wp-includes/script-loader.php (modified) (7 diffs)
- trunk/wp-includes/streams.php (modified) (2 diffs)
- trunk/wp-includes/taxonomy.php (modified) (6 diffs)
- trunk/wp-includes/theme.php (modified) (2 diffs)
- trunk/wp-includes/user.php (modified) (1 diff)
- trunk/wp-includes/vars.php (modified) (4 diffs)
- trunk/wp-includes/widgets.php (modified) (5 diffs)
- trunk/wp-includes/wp-db.php (modified) (2 diffs)
- trunk/wp-mail.php (modified) (1 diff)
- trunk/wp-settings.php (modified) (1 diff)
- trunk/xmlrpc.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/edit-pages.php
r5587 r5700 42 42 </fieldset> 43 43 44 44 45 45 <fieldset><legend><?php _e('Page Type…'); ?></legend> 46 46 <select name='post_status'> trunk/wp-admin/export.php
r5674 r5700 134 134 another. This file is not intended to serve as a complete backup of your 135 135 blog. 136 136 137 137 To import this information into a WordPress blog follow these steps: 138 138 139 139 1. Log into that blog as an administrator. 140 140 2. Go to Manage > Import in the blog's admin. trunk/wp-admin/import/blogger.php
r5404 r5700 916 916 array_push($this->in_content, ">"); 917 917 } 918 918 919 919 array_push($this->in_content, "<". $this->ns_to_prefix($name) ."{$xmlns_str}{$attrs_str}"); 920 920 } else if(in_array($tag, $this->ATOM_CONTENT_ELEMENTS) || in_array($tag, $this->ATOM_SIMPLE_ELEMENTS)) { trunk/wp-admin/import/mt.php
r5684 r5700 273 273 $ping = new StdClass(); 274 274 $pings = array(); 275 275 276 276 echo "<div class='wrap'><ol>"; 277 277 trunk/wp-admin/import/utw.php
r5390 r5700 2 2 3 3 class UTW_Import { 4 4 5 5 function header() { 6 6 echo '<div class="wrap">'; … … 24 24 echo '</div>'; 25 25 } 26 27 26 27 28 28 function dispatch () { 29 29 if ( empty( $_GET['step'] ) ) { … … 32 32 $step = (int) $_GET['step']; 33 33 } 34 34 35 35 // load the header 36 36 $this->header(); 37 37 38 38 switch ( $step ) { 39 39 case 0 : … … 53 53 break; 54 54 } 55 55 56 56 // load the footer 57 57 $this->footer(); 58 58 } 59 60 59 60 61 61 function import_tags ( ) { 62 62 echo '<div class="narrow">'; 63 63 echo '<p><h3>'.__('Reading UTW Tags…').'</h3></p>'; 64 64 65 65 $tags = $this->get_utw_tags(); 66 66 67 67 // if we didn't get any tags back, that's all there is folks! 68 68 if ( !is_array($tags) ) { … … 78 78 79 79 add_option('utwimp_tags', $tags); 80 80 81 81 82 82 $count = count($tags); 83 83 84 84 echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags were read.'), $count ) . '<br /></p>'; 85 85 echo '<p>' . __('The following tags were found:') . '</p>'; 86 86 87 87 echo '<ul>'; 88 88 89 89 foreach ( $tags as $tag_id => $tag_name ) { 90 90 91 91 echo '<li>' . $tag_name . '</li>'; 92 92 93 93 } 94 94 95 95 echo '</ul>'; 96 96 97 97 echo '<br />'; 98 98 99 99 echo '<p>' . __('If you don’t want to import any of these tags, you should delete them from the UTW tag management page and then re-run this import.') . '</p>'; 100 101 102 } 103 100 101 102 } 103 104 104 echo '<form action="admin.php?import=utw&step=2" method="post">'; 105 105 echo '<p class="submit"><input type="submit" name="submit" value="'.__('Step 2 »').'" /></p>'; … … 107 107 echo '</div>'; 108 108 } 109 110 109 110 111 111 function import_posts ( ) { 112 112 echo '<div class="narrow">'; … … 129 129 130 130 add_option('utwimp_posts', $posts); 131 131 132 132 133 133 $count = count($posts); 134 134 135 135 echo '<p>' . sprintf( __('Done! <strong>%s</strong> tag to post relationships were read.'), $count ) . '<br /></p>'; 136 136 137 137 } 138 138 … … 143 143 144 144 } 145 146 145 146 147 147 function import_t2p ( ) { 148 148 … … 152 152 // run that funky magic! 153 153 $tags_added = $this->tag2post(); 154 154 155 155 echo '<p>' . sprintf( __('Done! <strong>%s</strong> tags where added!'), $tags_added ) . '<br /></p>'; 156 156 … … 161 161 162 162 } 163 164 163 164 165 165 function get_utw_tags ( ) { 166 166 167 167 global $wpdb; 168 168 169 169 // read in all the tags from the UTW tags table: should be wp_tags 170 170 $tags_query = "SELECT tag_id, tag FROM " . $wpdb->prefix . "tags"; 171 171 172 172 $tags = $wpdb->get_results($tags_query); 173 173 174 174 // rearrange these tags into something we can actually use 175 175 foreach ( $tags as $tag ) { 176 176 177 177 $new_tags[$tag->tag_id] = $tag->tag; 178 179 } 180 178 179 } 180 181 181 return $new_tags; 182 182 183 183 } 184 184 185 185 function get_utw_posts ( ) { 186 186 187 187 global $wpdb; 188 188 189 189 // read in all the posts from the UTW post->tag table: should be wp_post2tag 190 190 $posts_query = "SELECT tag_id, post_id FROM " . $wpdb->prefix . "post2tag"; 191 191 192 192 $posts = $wpdb->get_results($posts_query); 193 193 194 194 return $posts; 195 196 } 197 198 195 196 } 197 198 199 199 function tag2post ( ) { 200 200 201 201 // get the tags and posts we imported in the last 2 steps 202 202 $tags = get_option('utwimp_tags'); 203 203 $posts = get_option('utwimp_posts'); 204 204 205 205 // null out our results 206 206 $tags_added = 0; 207 207 208 208 // loop through each post and add its tags to the db 209 209 foreach ( $posts as $this_post ) { 210 210 211 211 $the_post = (int) $this_post->post_id; 212 212 $the_tag = (int) $this_post->tag_id; 213 213 214 214 // what's the tag name for that id? 215 215 $the_tag = $tags[$the_tag]; 216 216 217 217 // screw it, just try to add the tag 218 218 wp_add_post_tags($the_post, $the_tag); 219 219 220 220 $tags_added++; 221 222 } 223 221 222 } 223 224 224 // that's it, all posts should be linked to their tags properly, pending any errors we just spit out! 225 225 return $tags_added; 226 227 228 } 229 230 226 227 228 } 229 230 231 231 function cleanup_import ( ) { 232 232 233 233 delete_option('utwimp_tags'); 234 234 delete_option('utwimp_posts'); 235 235 236 236 $this->done(); 237 238 } 239 240 237 238 } 239 240 241 241 function done ( ) { 242 242 243 243 echo '<div class="narrow">'; 244 244 echo '<p><h3>'.__('Import Complete!').'</h3></p>'; 245 245 246 246 echo '<p>' . __('OK, so we lied about this being a 5-step program! You’re done!') . '</p>'; 247 247 248 248 echo '<p>' . __('Now wasn’t that easy?') . '</p>'; 249 250 echo '</div>'; 251 252 } 253 249 250 echo '</div>'; 251 252 } 253 254 254 255 255 function UTW_Import ( ) { 256 256 257 257 // Nothing. 258 259 } 260 258 259 } 260 261 261 } 262 262 trunk/wp-admin/import/wordpress.php
r5448 r5700 252 252 echo '<h3>'.sprintf(__('All done.').' <a href="%s">'.__('Have fun!').'</a>', get_option('home')).'</h3>'; 253 253 } 254 254 255 255 function process_post($post) { 256 256 global $wpdb; … … 259 259 if ( $post_ID && !empty($this->posts_processed[$post_ID][1]) ) // Processed already 260 260 return 0; 261 261 262 262 // There are only ever one of these 263 263 $post_title = $this->get_tag( $post, 'title' ); … … 312 312 if ( $post_id && $post_ID && $this->posts_processed[$post_ID] ) 313 313 $this->posts_processed[$post_ID][1] = $post_id; // New ID. 314 314 315 315 // Add categories. 316 316 if (count($categories) > 0) { trunk/wp-admin/import/wp-cat2tag.php
r5554 r5700 4 4 var $categories_to_convert = array(); 5 5 var $all_categories = array(); 6 6 7 7 function header() { 8 8 print '<div class="wrap">'; 9 9 print '<h2>' . __('Convert Categories to Tags') . '</h2>'; 10 10 } 11 11 12 12 function footer() { 13 13 print '</div>'; 14 14 } 15 15 16 16 function populate_all_categories() { 17 17 global $wpdb; 18 18 19 19 $this->all_categories = get_categories('get=all'); 20 20 } 21 21 22 22 function welcome() { 23 23 $this->populate_all_categories(); 24 24 25 25 print '<div class="narrow">'; 26 26 27 27 if (count($this->all_categories) > 0) { 28 28 print '<p>' . __('Howdy! This converter allows you to selectively convert existing categories to tags. To get started, check the checkboxes of the categories you wish to be converted, then click the Convert button.') . '</p>'; 29 29 print '<p>' . __('Keep in mind that if you convert a category with child categories, those child categories get their parent setting removed, so they\'re in the root.') . '</p>'; 30 30 31 31 $this->categories_form(); 32 32 } else { 33 33 print '<p>'.__('You have no categories to convert!').'</p>'; 34 34 } 35 35 36 36 print '</div>'; 37 37 } 38 38 39 39 function categories_form() { 40 40 print '<form action="admin.php?import=wp-cat2tag&step=2" method="post">'; 41 41 print '<ul style="list-style:none">'; 42 42 43 43 $hier = _get_term_hierarchy('category'); 44 44 45 45 foreach ($this->all_categories as $category) { 46 46 if ((int) $category->parent == 0) { 47 47 print '<li><label><input type="checkbox" name="cats_to_convert[]" value="' . intval($category->term_id) . '" /> ' . $category->name . ' (' . $category->count . ')</label>'; 48 48 49 49 if (isset($hier[$category->term_id])) { 50 50 $this->_category_children($category, $hier); 51 51 } 52 52 53 53 print '</li>'; 54 54 } 55 55 } 56 56 57 57 print '</ul>'; 58 58 59 59 print '<p class="submit"><input type="submit" name="maybe_convert_all_cats" value="' . __('Convert All Categories') . '" /> <input type="submit" name="submit" value="' . __('Convert »') . '" /></p>'; 60 60 print '</form>'; 61 61 } 62 62 63 63 function _category_children($parent, $hier) { 64 64 print '<ul style="list-style:none">'; 65 65 66 66 foreach ($hier[$parent->term_id] as $child_id) { 67 67 $child =& get_category($child_id); 68 68 69 69 print '<li><label><input type="checkbox" name="cats_to_convert[]" value="' . intval($child->term_id) . '" /> ' . $child->name . ' (' . $child->count . ')</label>'; 70 70 71 71 if (isset($hier[$child->term_id])) { 72 72 $this->_category_children($child, $hier); 73 73 } 74 74 75 75 print '</li>'; 76 76 } 77 77 78 78 print '</ul>'; 79 79 } 80 80 81 81 function _category_exists($cat_id) { 82 82 global $wpdb; 83 83 84 84 $cat_id = (int) $cat_id; 85 85 86 86 $maybe_exists = category_exists($cat_id); 87 87 88 88 if ( $maybe_exists ) { 89 89 return true; … … 92 92 } 93 93 } 94 94 95 95 function convert_them() { 96 96 global $wpdb; 97 97 98 98 if (!isset($_POST['cats_to_convert']) || !is_array($_POST['cats_to_convert'])) { 99 99 print '<div class="narrow">'; … … 101 101 print '</div>'; 102 102 } 103 104 103 104 105 105 if ( empty($this->categories_to_convert) ) 106 106 $this->categories_to_convert = $_POST['cats_to_convert']; 107 107 $hier = _get_term_hierarchy('category'); 108 108 109 109 print '<ul>'; 110 110 111 111 foreach ($this->categories_to_convert as $cat_id) { 112 112 $cat_id = (int) $cat_id; 113 113 114 114 print '<li>' . __('Converting category') . ' #' . $cat_id . '... '; 115 115 116 116 if (!$this->_category_exists($cat_id)) { 117 117 _e('Category doesn\'t exist!'); 118 118 } else { 119 119 $category =& get_category($cat_id); 120 120 121 121 // Set the category itself to $type from above 122 122 $wpdb->query("UPDATE $wpdb->term_taxonomy SET taxonomy = 'post_tag' WHERE term_id = '{$category->term_id}' AND taxonomy = 'category'"); 123 123 124 124 // Set all parents to 0 (root-level) if their parent was the converted tag 125 125 $wpdb->query("UPDATE $wpdb->term_taxonomy SET parent = 0 WHERE parent = '{$category->term_id}' AND taxonomy = 'category'"); 126 126 127 127 // Clean the cache 128 128 clean_category_cache($category->term_id); 129 129 130 130 _e('Converted successfully.'); 131 131 } 132 132 133 133 print '</li>'; 134 134 } 135 135 136 136 print '</ul>'; 137 137 } 138 138 139 139 function convert_all_confirm() { 140 140 print '<div class="narrow">'; 141 141 142 142 print '<h3>' . __('Confirm') . '</h3>'; 143 143 144 144 print '<p>' . __('You are about to convert all categories to tags. Are you sure you want to continue?') . '</p>'; 145 145 146 146 print '<form action="admin.php?import=wp-cat2tag" method="post">'; 147 147 print '<p style="text-align:center" class="submit"><input type="submit" value="' . __('Yes') . '" name="yes_convert_all_cats" /> <input type="submit" value="' . __('No') . '" name="no_dont_do_it" /></p>'; 148 148 print '</form>'; 149 149 150 150 print '</div>'; 151 151 } 152 152 153 153 function convert_all() { 154 154 global $wpdb; … … 157 157 clean_category_cache($category->term_id); 158 158 } 159 159 160 160 function init() { 161 161 echo '<!--'; print_r($_POST); print_r($_GET); echo '-->'; 162 162 163 163 if (isset($_POST['maybe_convert_all_cats'])) { 164 164 $step = 3; … … 170 170 $step = (isset($_GET['step'])) ? (int) $_GET['step'] : 1; 171 171 } 172 172 173 173 $this->header(); 174 174 175 175 if (!current_user_can('manage_categories')) { 176 176 print '<div class="narrow">'; … … 182 182 $this->welcome(); 183 183 break; 184 184 185 185 case 2 : 186 186 $this->convert_them(); 187 187 break; 188 188 189 189 case 3 : 190 190 $this->convert_all_confirm(); 191 191 break; 192 192 193 193 case 4 : 194 194 $this->convert_all(); … … 196 196 } 197 197 } 198 198 199 199 $this->footer(); 200 200 } 201 201 202 202 function WP_Categories_to_Tags() { 203 203 // Do nothing. trunk/wp-admin/includes/bookmark.php
r5637 r5700 47 47 48 48 $wpdb->query("DELETE FROM $wpdb->links WHERE link_id = '$link_id'"); 49 49 50 50 do_action('deleted_link', $link_id); 51 51 trunk/wp-admin/includes/file.php
r5566 r5700 139 139 if ( ( !$type || !$ext ) && !current_user_can( 'unfiltered_upload' ) ) 140 140 return $upload_error_handler( $file, __( 'File type does not meet security guidelines. Try another.' )); 141 141 142 142 if ( !$ext ) 143 143 $ext = strrchr($file['name'], '.'); trunk/wp-admin/includes/image.php
r5566 r5700 122 122 if (function_exists('imageantialias')) 123 123 imageantialias( $dst, true ); 124 124 125 125 imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); 126 126 trunk/wp-admin/includes/plugin.php
r5630 r5700 8 8 preg_match( '|Author:(.*)$|mi', $plugin_data, $author_name ); 9 9 preg_match( '|Author URI:(.*)$|mi', $plugin_data, $author_uri ); 10 10 11 11 if ( preg_match( "|Version:(.*)|i", $plugin_data, $version )) 12 12 $version = trim( $version[1] ); trunk/wp-admin/includes/schema.php
r5551 r5700 393 393 function populate_roles_230() { 394 394 $role = get_role( 'administrator' ); 395 395 396 396 if ( !empty( $role ) ) { 397 397 $role->add_cap( 'unfiltered_upload' ); trunk/wp-admin/includes/template.php
r5692 r5700 150 150 151 151 $categories = get_terms('link_category', 'orderby=count&hide_empty=0'); 152 152 153 153 if ( empty($categories) ) 154 154 return; … … 422 422 if ( $for_post ) 423 423 $edit = ( ('draft' == $post->post_status ) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date ) ) ? false : true; 424 424 425 425 echo '<fieldset><legend><input type="checkbox" class="checkbox" name="edit_date" value="1" id="timestamp" /> <label for="timestamp">'.__( 'Edit timestamp' ).'</label></legend>'; 426 426 trunk/wp-admin/includes/theme.php
r5630 r5700 34 34 foreach ( $templates as $template ) { 35 35 $template_data = implode( '', file( ABSPATH.$template )); 36 36 37 37 preg_match( '|Template Name:(.*)$|mi', $template_data, $name ); 38 38 preg_match( '|Description:(.*)$|mi', $template_data, $description ); trunk/wp-admin/includes/upgrade.php
r5643 r5700 188 188 if ( $wp_current_db_version < 4351 ) 189 189 upgrade_old_slugs(); 190 190 191 191 if ( $wp_current_db_version < 5539 ) 192 192 upgrade_230(); 193 193 194 194 195 195 maybe_disable_automattic_widgets(); 196 196 … … 577 577 function upgrade_230() { 578 578 global $wp_current_db_version, $wpdb; 579 579 580 580 if ( $wp_current_db_version < 5200 ) { 581 581 populate_roles_230(); … … 629 629 $tt_ids[$term_id][$taxonomy] = (int) $wpdb->insert_id; 630 630 } 631 631 632 632 if ( empty($count) ) { 633 633 $count = 0; … … 757 757 function __get_option($setting) { 758 758 global $wpdb; 759 759 760 760 if ( $setting == 'home' && defined( 'WP_HOME' ) ) { 761 761 return preg_replace( '|/+$|', '', constant( 'WP_HOME' ) ); 762 762 } 763 763 764 764 if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) ) { 765 765 return preg_replace( '|/+$|', '', constant( 'WP_SITEURL' ) ); 766 766 } 767 767 768 768 $option = $wpdb->get_var("SELECT option_value FROM $wpdb->options WHERE option_name = '$setting'"); 769 769 … … 1209 1209 function maybe_disable_automattic_widgets() { 1210 1210 $plugins = __get_option( 'active_plugins' ); 1211 1211 1212 1212 foreach ( (array) $plugins as $plugin ) { 1213 1213 if ( basename( $plugin ) == 'widgets.php' ) { trunk/wp-admin/link-import.php
r5439 r5700 99 99 $opml = file_get_contents($opml_url); 100 100 } 101 101 102 102 include_once('link-parse-opml.php'); 103 103 trunk/wp-admin/moderation.php
r5663 r5700 20 20 if ( $action == 'update' ) { 21 21 check_admin_referer( 'moderate-comments' ); 22 22 23 23 if ( !current_user_can( 'moderate_comments' ) ) { 24 24 wp_die( __( 'Your level is not high enough to moderate comments.' ) ); 25 25 } 26 26 27 27 $item_ignored = 0; 28 28 $item_deleted = 0; 29 29 $item_approved = 0; 30 30 $item_spam = 0; 31 31 32 32 foreach ( $comment as $k => $v ) { 33 33 if ( $feelinglucky && $v == 'later' ) { 34 34 $v = 'delete'; 35 35 } 36 36 37 37 switch ( $v ) { 38 38 case 'later' : 39 39 $item_ignored++; 40 40 break; 41 41 42 42 case 'delete' : 43 43 wp_set_comment_status( $k, 'delete' ); 44 44 $item_deleted++; 45 45 break; 46 46 47 47 case 'spam' : 48 48 wp_set_comment_status( $k, 'spam' ); 49 49 $item_spam++; 50 50 break; 51 51 52 52 case 'approve' : 53 53 wp_set_comment_status( $k, 'approve' ); 54 54 55 55 if ( get_option( 'comments_notify' ) == true ) { 56 56 wp_notify_postauthor( $k ); 57 57 } 58 58 59 59 $item_approved++; 60 60 break; 61 61 } 62 62 } 63 63 64 64 wp_redirect( basename( __FILE__ ) . '?ignored=' . $item_ignored . '&deleted=' . $item_deleted . '&approved=' . $item_approved . '&spam=' . $item_spam ); 65 65 exit; … … 78 78 $deleted = isset( $_GET['deleted'] ) ? (int) $_GET['deleted'] : 0; 79 79 $spam = isset( $_GET['ignored'] ) ? (int) $_GET['spam'] : 0; 80 80 81 81 if ( $approved > 0 || $deleted > 0 || $spam > 0 ) { 82 82 echo '<div id="moderated" class="updated fade"><p>'; 83 83 84 84 if ( $approved > 0 ) { 85 85 printf( __ngettext( '%s comment approved.', '%s comments approved.', $approved ), $approved ); 86 86 echo '<br />'; 87 87 } 88 88 89 89 if ( $deleted > 0 ) { 90 90 printf( __ngettext( '%s comment deleted', '%s comments deleted.', $deleted ), $deleted ); 91 91 echo '<br />'; 92 92 } 93 93 94 94 if ( $spam > 0 ) { 95 95 printf( __ngettext( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam ); 96 96 echo '<br />'; 97 97 } 98 98 99 99 echo '</p></div>'; 100 100 } … … 138 138 ?> 139 139 <h2><?php _e( 'Moderation Queue' ); ?></h2> 140 140 141 141 <?php 142 142 if ( $page_links ) { … … 144 144 } 145 145 ?> 146 146 147 147 <form name="approval" id="approval" action="<?php echo basename( __FILE__ ); ?>" method="post"> 148 148 <?php wp_nonce_field( 'moderate-comments' ); ?> … … 151 151 <?php 152 152 $i = 0; 153 153 154 154 foreach ( $comments as $comment ) { 155 155 $class = 'js-unapproved'; 156 156 157 157 if ( $i++ % 2 ) { 158 158 $class .= ' alternate'; … … 166 166 | <?php _e( 'IP:' ); ?> <a href="http://ws.arin.net
