Changeset 816
- Timestamp:
- 11/30/06 18:54:22 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-functions.php (modified) (8 diffs)
- trunk/wp-admin/cat-js.php (modified) (1 diff)
- trunk/wp-admin/comment.php (modified) (6 diffs)
- trunk/wp-admin/dbx-admin-key-js.php (modified) (2 diffs)
- trunk/wp-admin/edit-comments.php (modified) (3 diffs)
- trunk/wp-admin/edit-page-form.php (modified) (1 diff)
- trunk/wp-admin/edit.php (modified) (1 diff)
- trunk/wp-admin/export.php (modified) (2 diffs)
- trunk/wp-admin/import/blogger.php (modified) (4 diffs)
- trunk/wp-admin/import/wordpress.php (modified) (4 diffs)
- trunk/wp-admin/link-add.php (modified) (1 diff)
- trunk/wp-admin/link-manager.php (modified) (2 diffs)
- trunk/wp-admin/moderation.php (modified) (1 diff)
- trunk/wp-admin/plugins.php (modified) (1 diff)
- trunk/wp-admin/upgrade-functions.php (modified) (1 diff)
- trunk/wp-admin/upload-js.php (modified) (3 diffs)
- trunk/wp-admin/upload.css (modified) (1 diff)
- trunk/wp-admin/users.php (modified) (1 diff)
- trunk/wp-commentsrss2.php (modified) (1 diff)
- trunk/wp-includes/bookmark-template.php (modified) (2 diffs)
- trunk/wp-includes/class-simplepie.php (deleted)
- trunk/wp-includes/default-filters.php (modified) (1 diff)
- trunk/wp-includes/formatting.php (modified) (1 diff)
- trunk/wp-includes/general-template.php (modified) (3 diffs)
- trunk/wp-includes/gettext.php (modified) (1 diff)
- trunk/wp-includes/js/autosave.js.php (modified) (3 diffs)
- trunk/wp-includes/js/list-manipulation-js.php (modified) (2 diffs)
- trunk/wp-includes/js/tinymce/wp-mce-help.php (modified) (1 diff)
- trunk/wp-includes/js/wp-ajax-js.php (modified) (1 diff)
- trunk/wp-includes/kses.php (modified) (1 diff)
- trunk/wp-includes/post-template.php (modified) (4 diffs)
- trunk/wp-includes/query.php (modified) (1 diff)
- trunk/wp-includes/rewrite.php (modified) (2 diffs)
- trunk/wp-includes/theme.php (modified) (1 diff)
- trunk/wp-includes/wp-db.php (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-functions.php
r810 r816 445 445 if ( isset( $_POST['url'] ) ) { 446 446 $user->user_url = wp_specialchars( trim( $_POST['url'] )); 447 $user->user_url = preg_match( '/^(https?|ftps?|mailto|news|gopher):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;447 $user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url; 448 448 } 449 449 if ( isset( $_POST['first_name'] )) … … 559 559 560 560 $_POST['link_url'] = wp_specialchars( $_POST['link_url'] ); 561 $_POST['link_url'] = preg_match( '/^(https?|ftps?|mailto|news|gopher):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url'];561 $_POST['link_url'] = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $_POST['link_url']) ? $_POST['link_url'] : 'http://' . $_POST['link_url']; 562 562 $_POST['link_name'] = wp_specialchars( $_POST['link_name'] ); 563 563 $_POST['link_image'] = wp_specialchars( $_POST['link_image'] ); … … 599 599 600 600 function sort_cats( $cat1, $cat2 ) { 601 return strcasecmp( $cat1['cat_name'], $cat2['cat_name'] ); 601 if ( $cat1['checked'] || $cat2['checked'] ) 602 return ( $cat1['checked'] && !$cat2['checked'] ) ? -1 : 1; 603 else 604 return strcasecmp( $cat1['cat_name'], $cat2['cat_name'] ); 602 605 } 603 606 … … 759 762 <td>" . ( $name_override ? $name_override : $pad . ' ' . $category->cat_name ) . "</td> 760 763 <td>$category->category_description</td> 761 <td align='center'> $category->category_count</td>764 <td align='center'><a href='edit.php?cat=$category->cat_ID'>$category->category_count</a></td> 762 765 <td align='center'>$category->link_count</td> 763 766 <td>$edit</td>\n\t</tr>\n"; … … 1038 1041 ORDER BY meta_id DESC 1039 1042 LIMIT $limit" ); 1040 natcasesort( $keys ); 1043 if ( $keys ) 1044 natcasesort($keys); 1041 1045 ?> 1042 1046 <h3><?php _e( 'Add a new custom field:' ) ?></h3> … … 1992 1996 1993 1997 $url = $file['url']; 1998 $type = $file['type']; 1994 1999 $file = addslashes( $file['file'] ); 1995 2000 $filename = basename( $file ); … … 1998 2003 $object = array( 'post_title' => $filename, 1999 2004 'post_content' => $url, 2000 'post_mime_type' => 'import',2005 'post_mime_type' => $type, 2001 2006 'guid' => $url 2002 2007 ); … … 2078 2083 } 2079 2084 2085 2086 function wp_check_for_changed_slugs($post_id) { 2087 if ( !strlen($_POST['wp-old-slug']) ) 2088 return $post_id; 2089 2090 $post = &get_post($post_id); 2091 2092 // we're only concerned with published posts 2093 if ( $post->post_status != 'publish' || $post->post_type != 'post' ) 2094 return $post_id; 2095 2096 // only bother if the slug has changed 2097 if ( $post->post_name == $_POST['wp-old-slug'] ) 2098 return $post_id; 2099 2100 $old_slugs = get_post_meta($post_id, '_wp_old_slug'); 2101 2102 // if we haven't added this old slug before, add it now 2103 if ( !count($old_slugs) || !in_array($_POST['wp-old-slug'], $old_slugs) ) 2104 add_post_meta($post_id, '_wp_old_slug', $_POST['wp-old-slug']); 2105 2106 // if the new slug was used previously, delete it from the list 2107 if ( in_array($post->post_name, $old_slugs) ) 2108 delete_post_meta($post_id, '_wp_old_slug', $post->post_name); 2109 2110 return $post_id; 2111 } 2112 2113 2114 function wp_remember_old_slug() { 2115 global $post; 2116 $name = wp_specialchars($post->post_name); // just in case 2117 if ( strlen($name) ) 2118 echo '<input type="hidden" id="wp-old-slug" name="wp-old-slug" value="' . $name . '" />'; 2119 } 2120 2121 2080 2122 // If siteurl or home changed, reset cookies and flush rewrite rules. 2081 2123 function update_home_siteurl( $old_value, $value ) { trunk/wp-admin/cat-js.php
r753 r816 9 9 if ( !jaxcat ) 10 10 return false; 11 jaxcat.update('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="<?php _e('Add'); ?>"/><span id="howto"><?php _e('Separate multiple categories with commas.'); ?></span></span>');11 jaxcat.update('<span id="ajaxcat"><input type="text" name="newcat" id="newcat" size="16" autocomplete="off"/><input type="button" name="Button" id="catadd" value="<?php echo js_escape(__('Add')); ?>"/><span id="howto"><?php js_escape(__('Separate multiple categories with commas.')); ?></span></span>'); 12 12 $('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); }; 13 13 $('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); }; trunk/wp-admin/comment.php
r810 r816 19 19 20 20 if ( ! $comment = get_comment($comment) ) 21 wp_die( sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'javascript:history.go(-1)'));21 wp_die(__('Oops, no comment with this ID.').sprintf(' <a href="%s">'.__('Go back').'</a>!', 'javascript:history.go(-1)')); 22 22 23 23 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) … … 41 41 42 42 if ( ! $comment = get_comment($comment) ) 43 wp_die( sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));43 wp_die(__('Oops, no comment with this ID.').sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit.php')); 44 44 45 45 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) … … 50 50 <div class="narrow"> 51 51 <?php if ( 'spam' == $_GET['dt'] ) { ?> 52 <p><?php _e('<strong>Caution:</strong>You are about to mark the following comment as spam:'); ?></p>52 <p><?php echo '<strong>'.__('Caution:').'</strong> '.__('You are about to mark the following comment as spam:'); ?></p> 53 53 <?php } elseif ( 'cdc' == $action ) { ?> 54 <p><?php _e('<strong>Caution:</strong>You are about to delete the following comment:'); ?></p>54 <p><?php echo '<strong>'.__('Caution:').'</strong> '.__('You are about to delete the following comment:'); ?></p> 55 55 <?php } else { ?> 56 <p><?php _e('<strong>Caution:</strong>You are about to approve the following comment:'); ?></p>56 <p><?php echo '<strong>'.__('Caution:').'</strong> '.__('You are about to approve the following comment:'); ?></p> 57 57 <?php } ?> 58 58 … … 117 117 118 118 if ( ! $comment = get_comment($comment) ) 119 wp_die( sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit-comments.php'));119 wp_die(__('Oops, no comment with this ID.').sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit-comments.php')); 120 120 121 121 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) … … 146 146 147 147 if ( ! $comment = get_comment($comment) ) 148 wp_die( sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));148 wp_die(__('Oops, no comment with this ID.').sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit.php')); 149 149 150 150 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) … … 172 172 173 173 if ( ! $comment = get_comment($comment) ) 174 wp_die( sprintf(__('Oops, no comment with this ID. <a href="%s">Go back</a>!'), 'edit.php'));174 wp_die(__('Oops, no comment with this ID.').sprintf(' <a href="%s">'.__('Go back').'</a>!', 'edit.php')); 175 175 176 176 if ( !current_user_can('edit_post', $comment->comment_post_ID) ) trunk/wp-admin/dbx-admin-key-js.php
r810 r816 33 33 'yes', // include open/close toggle buttons ['yes'|'no'] 34 34 'closed', // default state ['open'|'closed'] 35 ' open', // word for "open", as in "open this box"36 ' close', // word for "close", as in "close this box"37 ' click-down and drag to move this box', // sentence for "move this box" by mouse38 ' click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse39 ' use the arrow keys to move this box', // sentence for "move this box" by keyboard40 ' , or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard35 '<?php echo js_escape(__('open')); ?>', // word for "open", as in "open this box" 36 '<?php echo js_escape(__('close')); ?>', // word for "close", as in "close this box" 37 '<?php echo js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse 38 '<?php echo js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse 39 '<?php echo js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard 40 '<?php echo js_escape(__(', or press the enter key to %toggle% it')); ?>', // pattern-match sentence-fragment for "(open|close) this box" by keyboard 41 41 '%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts 42 42 ); … … 58 58 'yes', // include open/close toggle buttons ['yes'|'no'] 59 59 'closed', // default state ['open'|'closed'] 60 ' open', // word for "open", as in "open this box"61 ' close', // word for "close", as in "close this box"62 ' click-down and drag to move this box', // sentence for "move this box" by mouse63 ' click to %toggle% this box', // pattern-match sentence for "(open|close) this box" by mouse64 ' use the arrow keys to move this box', // sentence for "move this box" by keyboard65 ' , or press the enter key to %toggle% it', // pattern-match sentence-fragment for "(open|close) this box" by keyboard60 '<?php echo js_escape(__('open')); ?>', // word for "open", as in "open this box" 61 '<?php echo js_escape(__('close')); ?>', // word for "close", as in "close this box" 62 '<?php echo js_escape(__('click-down and drag to move this box')); ?>', // sentence for "move this box" by mouse 63 '<?php echo js_escape(__('click to %toggle% this box')); ?>', // pattern-match sentence for "(open|close) this box" by mouse 64 '<?php echo js_escape(__('use the arrow keys to move this box')); ?>', // sentence for "move this box" by keyboard 65 '<?php echo js_escape(__(', or press the enter key to %toggle% it')); ?>', // pattern-match sentence-fragment for "(open|close) this box" by keyboard 66 66 '%mytitle% [%dbxtitle%]' // pattern-match syntax for title-attribute conflicts 67 67 ); trunk/wp-admin/edit-comments.php
r810 r816 158 158 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 159 159 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 160 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> ';160 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . js_escape(sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), $comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 161 161 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 162 162 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 163 163 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $comment->comment_post_ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 164 164 } 165 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> ";165 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=" . $comment->comment_post_ID . "&c=" . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . "\" onclick=\"return deleteSomething( 'comment-as-spam', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to mark as spam this comment by "%s".\\n"Cancel" to stop, "OK" to mark as spam."), $comment->comment_author)) . "', theCommentList );\">" . __('Spam') . "</a> "; 166 166 } 167 167 $post = get_post($comment->comment_post_ID); … … 224 224 echo "<a href='comment.php?action=editcomment&c=$comment->comment_ID' class='edit'>" . __('Edit') . "</a>"; } ?></td> 225 225 <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 226 echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape($comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> ";226 echo "<a href=\"comment.php?action=deletecomment&p=".$comment->comment_post_ID."&c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), $comment->comment_author )) . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> "; 227 227 } ?></td> 228 228 </tr> … … 230 230 } // end foreach 231 231 ?></table> 232 <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" />233 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.")?>')" /></p>232 <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments »') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to delete")); ?>'); return false } return confirm('<?php echo js_escape(sprintf(__("You are about to delete %s comments permanently \\n \'Cancel\' to stop, \'OK\' to delete.")), "' + numchecked + '"); ?>')" /> 233 <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam »') ?>" onclick="return confirm('<?php echo js_escape(__("You are about to mark these comments as spam \\n \'Cancel\' to stop, \'OK\' to mark as spam.")); ?>')" /></p> 234 234 </form> 235 235 <div id="ajax-response"></div> trunk/wp-admin/edit-page-form.php
r810 r816 189 189 $delete_nonce = wp_create_nonce( 'delete-page_' . $post_ID ); 190 190 if ( current_user_can('delete_page', $post->ID) ) ?> 191 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title)) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />191 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this page') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this page \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 192 192 <?php endif; ?> 193 193 </div> trunk/wp-admin/edit.php
r810 r816 128 128 // define the columns to display, the syntax is 'internal name' => 'display name' 129 129 $posts_columns = array( 130 'id' => __('ID'),130 'id' => '<div style="text-align: center">' . __('ID') . '</div>', 131 131 'date' => __('When'), 132 132 'title' => __('Title'), 133 133 'categories' => __('Categories'), 134 'comments' => __('Comments'),134 'comments' => '<div style="text-align: center">' . __('Comments') . '</div>', 135 135 'author' => __('Author') 136 136 ); trunk/wp-admin/export.php
r810 r816 62 62 63 63 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); 64 65 $categories = (array) $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename, category_description, category_parent, posts_private, links_private FROM $wpdb->categories LEFT JOIN $wpdb->post2cat ON (category_id = cat_id) LEFT JOIN $wpdb->posts ON (post_id <=> id) $where GROUP BY cat_id"); 66 67 function wxr_missing_parents($categories) { 68 if ( !is_array($categories) || empty($categories) ) 69 return array(); 70 71 foreach ( $categories as $category ) 72 $parents[$category->cat_ID] = $category->category_parent; 73 74 $parents = array_unique(array_diff($parents, array_keys($parents))); 75 76 if ( $zero = array_search('0', $parents) ) 77 unset($parents[$zero]); 78 79 return $parents; 80 } 81 82 while ( $parents = wxr_missing_parents($categories) ) { 83 $found_parents = $wpdb->get_results("SELECT cat_ID, cat_name, category_nicename, category_description, category_parent, posts_private, links_private FROM $wpdb->categories WHERE cat_ID IN (" . join(', ', $parents) . ")"); 84 if ( is_array($found_parents) && count($found_parents) ) 85 $categories = array_merge($categories, $found_parents); 86 else 87 break; 88 } 89 90 // Put them in order to be inserted with no child going before its parent 91 $pass = 0; 92 $passes = 1000 + count($categories); 93 while ( ( $cat = array_shift($categories) ) && ++$pass < $passes ) { 94 if ( $cat->category_parent == 0 || isset($cats[$cat->category_parent]) ) { 95 $cats[$cat->cat_ID] = $cat; 96 } else { 97 $categories[] = $cat; 98 } 99 } 100 unset($categories); 101 102 function wxr_cdata($str) { 103 if ( seems_utf8($str) == false ) 104 $str = utf8_encode($str); 105 106 // $str = ent2ncr(wp_specialchars($str)); 107 108 $str = "<![CDATA[$str" . ( ( substr($str, -1) == ']' ) ? ' ' : '') . "]]>"; 109 110 return $str; 111 } 112 113 function wxr_cat_name($c) { 114 if ( empty($c->cat_name) ) 115 return; 116 117 echo '<wp:cat_name>' . wxr_cdata($c->cat_name) . '</wp:cat_name>'; 118 } 119 120 function wxr_category_description($c) { 121 if ( empty($c->category_description) ) 122 return; 123 124 echo '<wp:category_description>' . wxr_cdata($c->category_description) . '</wp:category_description>'; 125 } 64 126 ?> 65 127 <!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your blog. --> … … 88 150 <generator>http://wordpress.org/?v=<?php bloginfo_rss('version'); ?></generator> 89 151 <language><?php echo get_option('rss_language'); ?></language> 152 <?php if ( $cats ) : foreach ( $cats as $c ) : ?> 153 <wp:category><wp:category_nicename><?php echo $c->category_nicename; ?></wp:category_nicename><wp:category_parent><?php echo $c->category_parent ? $cats[$c->category_parent]->cat_name : ''; ?></wp:category_parent><wp:posts_private><?php echo $c->posts_private ? '1' : '0'; ?></wp:posts_private><wp:links_private><?php echo $c->links_private ? '1' : '0'; ?></wp:links_private><?php wxr_cat_name($c); ?><?php wxr_category_description($c); ?></wp:category> 154 <?php endforeach; endif; ?> 90 155 <?php do_action('rss2_head'); ?> 91 156 <?php if ($posts) { foreach ($posts as $post) { start_wp(); ?> trunk/wp-admin/import/blogger.php
r810 r816 11 11 $welcome = __('Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog.'); 12 12 $noiframes = __('This feature requires iframe support.'); 13 $warning = __('This will delete everything saved by the Blogger importer except your posts and comments. Are you sure you want to do this?');13 $warning = js_escape(__('This will delete everything saved by the Blogger importer except your posts and comments. Are you sure you want to do this?')); 14 14 $reset = __('Reset this importer'); 15 15 $incompat = __('Your web server is not properly configured to use this importer. Please enable the CURL extension for PHP and then reload this page.'); … … 256 256 'blog-options-archiving' => array('archiveFrequency' => 'm'), 257 257 'blog-publishing' => array('publishMode'=>'0', 'blogID' => "$id", 'subdomain' => mt_rand().mt_rand(), 'pingWeblogs' => 'false'), 258 'blog-formatting' => array('timeStampFormat' => '0', ' convertLineBreaks'=>'false', 'floatAlignment'=>'false'),258 'blog-formatting' => array('timeStampFormat' => '0', 'encoding'=>'UTF-8', 'convertLineBreaks'=>'false', 'floatAlignment'=>'false'), 259 259 'blog-comments' => array('commentsTimeStampFormat' => '0'), 260 260 'template-edit' => array( 'templateText' => str_replace('%title%', trim($blogsary[2][$key]), $template) ) … … 350 350 $form.= $body; 351 351 $form.= "</div><script type='text/javascript'>forms=document.getElementsByTagName('form');for(i=0;i<forms.length;i++){if(forms[i].action.search('{$blog_opt}')){forms[i].submit();break;}}</script>"; 352 $output.= '<p>'.sprintf( '<strong>%s</strong> in progress, please wait...', $blog_opt)."</p>\n";352 $output.= '<p>'.sprintf(__('<strong>%s</strong> in progress, please wait...'), $blog_opt)."</p>\n"; 353 353 } else { 354 354 $output.= "<p>$blog_opt</p>\n"; … … 429 429 $user_password = substr(md5(uniqid(microtime())), 0, 6); 430 430 $result = wp_create_user( $user_login, $user_password, $user_email ); 431 $status.= sprintf( 'Registered user <strong>%s</strong>.', $user_login);431 $status.= sprintf(__('Registered user <strong>%s</strong>.'), $user_login); 432 432 $this->import['blogs'][$_GET['blog']]['newusers'][] = $user_login; 433 433 } trunk/wp-admin/import/wordpress.php
r810 r816 70 70 preg_match_all('|<item>(.*?)</item>|is', $importdata, $this->posts); 71 71 $this->posts = $this->posts[1]; 72 preg_match_all('|<wp:category>(.*?)</wp:category>|is', $importdata, $this->categories); 73 $this->categories = $this->categories[1]; 72 74 } 73 75 … … 159 161 $this->get_entries(); 160 162 $this->wp_authors_form(); 163 } 164 165 function process_categories() { 166 global $wpdb; 167 168 $cat_names = (array) $wpdb->get_col("SELECT cat_name FROM $wpdb->categories"); 169 170 while ( $c = array_shift($this->categories) ) { 171 $cat_name = trim(str_replace(array ('<![CDATA[', ']]>'), '', $this->get_tag( $c, 'wp:cat_name' ))); 172 173 // If the category exists we leave it alone 174 if ( in_array($cat_name, $cat_names) ) 175 continue; 176 177 $category_nicename = $this->get_tag( $c, 'wp:category_nicename' ); 178 $posts_private = (int) $this->get_tag( $c, 'wp:posts_private' ); 179 $links_private = (int) $this->get_tag( $c, 'wp:links_private' ); 180 181 $parent = $this->get_tag( $c, 'wp:category_parent' ); 182 183 if ( empty($parent) ) 184 $category_parent = '0'; 185 else 186 $category_parent = (int) category_exists($parent); 187 188 $catarr = compact('category_nicename', 'category_parent', 'posts_private', 'links_private', 'posts_private', 'cat_name'); 189 190 $cat_ID = wp_insert_category($catarr); 191 } 161 192 } 162 193 … … 190 221 $cat_index = 0; 191 222 foreach ($categories as $category) { 192 $categories[$cat_index] = $wpdb->escape($this->unhtmlentities( $category));223 $categories[$cat_index] = $wpdb->escape($this->unhtmlentities(str_replace(array ('<![CDATA[', ']]>'), '', $category))); 193 224 $cat_index++; 194 225 } … … 261 292 $this->get_authors_from_post(); 262 293 $this->get_entries(); 294 $this->process_categories(); 263 295 $this->process_posts(); 264 296 } trunk/wp-admin/link-add.php
r810 r816 30 30 <h3><?php _e('Add Link Bookmarklet'); ?></h3> 31 31 <p><?php _e('Right click on the following link and choose "Bookmark This Link..." to create an add link shortcut. Right now this only works on Mozilla or Netscape, but we’re working on it.'); ?></p> 32 <?php printf( __('<p><a href="%s" title="Link add bookmarklet">Link This</a></p>'), "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?>32 <?php printf('<p><a href="%s" title="'.__('Link add bookmarklet').'">'.__('Link This').'</a></p>', "javascript:void(linkmanpopup=window.open('" . get_option('siteurl') . "/wp-admin/link-add.php?action=popup&linkurl='+escape(location.href)+'&name='+escape(document.title),'LinkManager','scrollbars=yes,width=750,height=550,left=15,top=15,status=yes,resizable=yes'));linkmanpopup.focus();window.focus();linkmanpopup.focus();") ?> 33 33 </div> 34 34 trunk/wp-admin/link-manager.php
r810 r816 162 162 163 163 echo '<td><a href="link.php?link_id='.$link->link_id.'&action=edit" class="edit">'.__('Edit').'</a></td>'; 164 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '". sprintf(__("You are about to delete the "%s" link to %s.\\n"Cancel" to stop, "OK" to delete."), js_escape($link->link_name), js_escape($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>';164 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the "%s" link to %s.\\n"Cancel" to stop, "OK" to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>'; 165 165 echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>'; 166 166 echo "\n </tr>\n"; … … 172 172 <div id="ajax-response"></div> 173 173 174 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links') ?> »" onclick="return confirm('<?php _e("You are about to delete these links permanently \\n \'Cancel\' to stop, \'OK\' to delete.")?>')" /></p>174 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links') ?> »" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently \\n \'Cancel\' to stop, \'OK\' to delete.")); ?>')" /></p> 175 175 </form> 176 176 </div> trunk/wp-admin/moderation.php
r810 r816 136 136 <p><?php comment_date('M j, g:i A'); ?> — [ <?php 137 137 echo '<a href="comment.php?action=editcomment&c='.$comment->comment_ID.'">' . __('Edit') . '</a> | '; 138 echo " <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete ') . "</a> | "; ?>138 echo " <a href=\"post.php?action=deletecomment&p=".$comment->comment_post_ID."&comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by "%s".\\n"Cancel" to stop, "OK" to delete."), $comment->comment_author )) . "', theCommentList );\">" . __('Delete ') . "</a> | "; ?> 139 139 <?php 140 140 $post = get_post($comment->comment_post_ID); trunk/wp-admin/plugins.php
r810 r816 113 113 $toggle = "<a href='" . wp_nonce_url("plugins.php?action=activate&plugin=$plugin_file", 'activate-plugin_' . $plugin_file) . "' title='".__('Activate this plugin')."' class='edit'>".__('Activate')."</a>"; 114 114 } 115 $plugin_data['Description'] = wp_kses($plugin_data['Description'], array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()) ); ; 115 116 $plugins_allowedtags = array('a' => array('href' => array(),'title' => array()),'abbr' => array('title' => array()),'acronym' => array('title' => array()),'code' => array(),'em' => array(),'strong' => array()); 117 118 // Sanitize all displayed data 119 $plugin_data['Title'] = wp_kses($plugin_data['Title'], $plugins_allowedtags); 120 $plugin_data['Version'] = wp_kses($plugin_data['Version'], $plugins_allowedtags); 121 $plugin_data['Description'] = wp_kses($plugin_data['Description'], $plugins_allowedtags); 122 $plugin_data['Author'] = wp_kses($plugin_data['Author'], $plugins_allowedtags); 123 116 124 if ( $style != '' ) 117 125 $style = 'class="' . $style . '"'; trunk/wp-admin/upgrade-functions.php
r810 r816 175 175 if ( $wp_current_db_version < 3845 ) 176 176 upgrade_210(); 177 178 if ( $wp_current_db_version < 4351 ) 179 upgrade_old_slugs(); 177 180 178 181 $wp_rewrite->flush_rules(); trunk/wp-admin/upload-js.php
r810 r816 98 98 h += "<table>"; 99 99 if ( this.currentImage.thumb ) { 100 h += "<tr><th style='padding-bottom:.5em'><?php echo addslashes(__('Show:')); ?></th><td style='padding-bottom:.5em'>";101 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo addslashes(__('Thumbnail')); ?></label><br />";102 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo addslashes(__('Full size')); ?></label>";100 h += "<tr><th style='padding-bottom:.5em'><?php echo js_escape(__('Show:')); ?></th><td style='padding-bottom:.5em'>"; 101 h += "<label for='display-thumb'><input type='radio' name='display' id='display-thumb' value='thumb' checked='checked' /> <?php echo js_escape(__('Thumbnail')); ?></label><br />"; 102 h += "<label for='display-full'><input type='radio' name='display' id='display-full' value='full' /> <?php echo js_escape(__('Full size')); ?></label>"; 103 103 h += "</td></tr>"; 104 104 } 105 105 106 h += "<tr><th><?php echo addslashes(__('Link to:')); ?></th><td>";107 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo addslashes(__('File')); ?></label><br />";108 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo addslashes(__('Page')); ?></label><br />";109 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo addslashes(__('None')); ?></label>";106 h += "<tr><th><?php echo js_escape(__('Link to:')); ?></th><td>"; 107 h += "<label for='link-file'><input type='radio' name='link' id='link-file' value='file' checked='checked'/> <?php echo js_escape(__('File')); ?></label><br />"; 108 h += "<label for='link-page'><input type='radio' name='link' id='link-page' value='page' /> <?php echo js_escape(__('Page')); ?></label><br />"; 109 h += "<label for='link-none'><input type='radio' name='link' id='link-none' value='none' /> <?php echo js_escape(__('None')); ?></label>"; 110 110 h += "</td></tr>"; 111 111 112 112 h += "<tr><td colspan='2'><p class='submit'>"; 113 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo addslashes(__('Send to editor')); ?> »' />";113 h += "<input type='button' class='button' name='send' onclick='theFileList.sendToEditor(" + id + ")' value='<?php echo js_escape(__('Send to editor »')); ?>' />"; 114 114 h += "</p></td></tr></table>"; 115 115 h += "</form>"; … … 135 135 params.ID = ''; 136 136 params.action = ''; 137 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title=' Browse your files' class='back'>« Back</a>";138 } else { 139 h += "<a href='#' onclick='return theFileList.cancelView();' title=' Browse your files' class='back'>« Back</a>";137 h += "<a href='" + this.urlData[0] + '?' + params.toQueryString() + "' title='<?php echo js_escape(__('Browse your files')); ?>' class='back'>« <?php echo js_escape(__('Back')); ?></a>"; 138 } else { 139 h += "<a href='#' onclick='return theFileList.cancelView();' title='<?php echo js_escape(__('Browse your files')); ?>' class='back'>« <?php echo js_escape(__('Back')); ?></a>"; 140 140 } 141 141 h += "<div id='file-title'>" 142 142 if ( !this.currentImage.isImage ) 143 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title=' Direct link to file'>" + this.currentImage.title + "</a></h2>";143 h += "<h2><a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo js_escape(__('Direct link to file')); ?>'>" + this.currentImage.title + "</a></h2>"; 144 144 else 145 145 h += "<h2>" + this.currentImage.title + "</h2>"; 146 146 h += " — <span>"; 147 h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'> Insert</a>"147 h += "<a href='#' onclick='return theFileList.imageView(" + id + ");'><?php js_escape(__('Insert')); ?></a>" 148 148 h += "</span>"; 149 149 h += '</div>' 150 150 h += "<div id='upload-file-view' class='alignleft'>"; 151 151 if ( this.currentImage.isImage ) { 152 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title=' Direct link to file'>";152 h += "<a href='" + this.currentImage.srcBase + this.currentImage.src + "' onclick='return false;' title='<?php echo js_escape(__('Direct link to file')); ?>'>"; 153 153 h += "<img src='" + ( this.currentImage.thumb ? this.currentImage.thumb : this.currentImage.src ) + "' alt='" + this.currentImage.title + "' width='" + this.currentImage.width + "' height='" + this.currentImage.height + "' />"; 154 154 h += "</a>"; … … 159 159 160 160 h += "<table><col /><col class='widefat' /><tr>" 161 h += "<th scope='row'><label for='url'> URL</label></th>";161 h += "<th scope='row'><label for='url'><?php echo js_escape(__('URL')); ?></label></th>"; 162 162 h += "<td><input type='text' id='url' class='readonly' value='" + this.currentImage.srcBase + this.currentImage.src + "' readonly='readonly' /></td>"; 163 163 h += "</tr><tr>"; 164 h += "<th scope='row'><label for='post_title'> Title</label></th>";164 h += "<th scope='row'><label for='post_title'><?php echo js_escape(__('Title')); ?></label></th>"; 165 165 h += "<td><input type='text' id='post_title' name='post_title' value='" + this.currentImage.title + "' /></td>"; 166 166 h += "</tr><tr>"; 167 h += "<th scope='row'><label for='post_content'> Description</label></th>";167 h += "<th scope='row'><label for='post_content'><?php echo js_escape(__('Description')); ?></label></th>"; 168 168 h += "<td><textarea name='post_content' id='post_content'>" + this.currentImage.description + "</textarea></td>"; 169 h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value=' Delete File' onclick='theFileList.deleteFile(" + id + ");' />";169 h += "</tr><tr id='buttons' class='submit'><td colspan='2'><input type='button' id='delete' name='delete' class='delete alignleft' value='<?php echo js_escape(__('Delete File')); ?>' onclick='theFileList.deleteFile(" + id + ");' />"; 170 170 h += "<input type='hidden' name='from_tab' value='" + this.tab + "' />"; 171 171 h += "<input type='hidden' name='action' id='action-value' value='save' />"; 172 172 h += "<input type='hidden' name='ID' value='" + id + "' />"; 173 173 h += "<input type='hidden' name='_wpnonce' value='" + this.nonce + "' />"; 174 h += "<div class='submit'><input type='submit' value=' Save »' /></div>";174 h += "<div class='submit'><input type='submit' value='<?php echo js_escape(__('Save »')); ?>' /></div>"; 175 175 h += "</td></tr></table></form>"; 176 176 trunk/wp-admin/upload.css
r810 r816 144 144 145 145 #upload-files a.file-link.image { 146 line-height: 128px;147 146 font-size: 2px; 148 147 letter-spacing: 0; trunk/wp-admin/users.php
r810 r816 3 3 require_once( ABSPATH . WPINC . '/registration.php'); 4 4 5 if ( !current_user_can('edit_users') ) 6 wp_die(__('Cheatin’ uh?')); 7 5 8 $title = __('Users'); 6 if ( current_user_can('edit_users') ) 7 $parent_file = 'users.php'; 8 else 9 $parent_file = 'profile.php'; 9 $parent_file = 'users.php'; 10 10 11 11 $action = $_REQUEST['actio
