Changeset 819
- Timestamp:
- 12/07/06 10:17:25 (2 years ago)
- Files:
-
- trunk/wp-admin/admin-ajax.php (modified) (2 diffs)
- trunk/wp-admin/admin-functions.php (modified) (6 diffs)
- trunk/wp-admin/cat-js.php (modified) (1 diff)
- trunk/wp-admin/edit-category-form.php (modified) (4 diffs)
- trunk/wp-admin/edit-comments.php (modified) (2 diffs)
- trunk/wp-admin/edit-form-advanced.php (modified) (1 diff)
- trunk/wp-admin/edit-form-comment.php (modified) (1 diff)
- trunk/wp-admin/edit.php (modified) (1 diff)
- trunk/wp-admin/export.php (modified) (1 diff)
- trunk/wp-admin/import.php (modified) (1 diff)
- trunk/wp-admin/import/blogger.php (modified) (2 diffs)
- trunk/wp-admin/import/dotclear.php (modified) (5 diffs)
- trunk/wp-admin/import/greymatter.php (modified) (2 diffs)
- trunk/wp-admin/import/livejournal.php (modified) (2 diffs)
- trunk/wp-admin/import/mt.php (modified) (5 diffs)
- trunk/wp-admin/import/rss.php (modified) (1 diff)
- trunk/wp-admin/import/textpattern.php (modified) (2 diffs)
- trunk/wp-admin/import/wordpress.php (modified) (2 diffs)
- trunk/wp-admin/link-manager.php (modified) (6 diffs)
- trunk/wp-admin/page.php (modified) (1 diff)
- trunk/wp-admin/post.php (modified) (1 diff)
- trunk/wp-admin/upgrade-functions.php (modified) (2 diffs)
- trunk/wp-admin/upload-functions.php (modified) (6 diffs)
- trunk/wp-admin/upload-js.php (modified) (4 diffs)
- trunk/wp-admin/upload.php (modified) (1 diff)
- trunk/wp-admin/users.js (modified) (1 diff)
- trunk/wp-admin/users.php (modified) (2 diffs)
- trunk/wp-admin/wp-admin.css (modified) (2 diffs)
- trunk/wp-includes/category-template.php (modified) (1 diff)
- trunk/wp-includes/classes.php (modified) (3 diffs)
- trunk/wp-includes/formatting.php (modified) (1 diff)
- trunk/wp-includes/js/autosave.js.php (modified) (5 diffs)
- trunk/wp-includes/js/list-manipulation-js.php (modified) (2 diffs)
- trunk/wp-includes/js/prototype.compressed.js (deleted)
- trunk/wp-includes/js/tinymce/themes/advanced/jscripts/link.js (modified) (1 diff)
- trunk/wp-includes/l10n.php (modified) (1 diff)
- trunk/wp-includes/post-template.php (modified) (5 diffs)
- trunk/wp-includes/post.php (modified) (6 diffs)
- trunk/wp-includes/script-loader.php (modified) (3 diffs)
- trunk/wp-includes/user.php (modified) (1 diff)
- trunk/wp-login.php (modified) (1 diff)
- trunk/xmlrpc.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/admin-ajax.php
r817 r819 148 148 'id' => $cat->cat_ID, 149 149 'data' => _cat_row( $cat, $level, $cat_full_name ), 150 'supplemental' => array('name' => $cat_full_name )150 'supplemental' => array('name' => $cat_full_name, 'show-link' => sprintf(__( 'Category <a href="#%s">%s</a> added' ), "cat-$cat->cat_ID", $cat_full_name)) 151 151 ) ); 152 152 $x->send(); … … 212 212 exit; 213 213 } 214 $user_object = new WP_User( $user_id ); 214 215 $x = new WP_Ajax_Response( array( 215 216 'what' => 'user', 216 217 'id' => $user_id, 217 'data' => user_row( $user_id ) 218 'data' => user_row( $user_object ), 219 'supplemental' => array('show-link' => sprintf(__( 'User <a href="#%s">%s</a> added' ), "user-$user_id", $user_object->user_login)) 218 220 ) ); 219 221 $x->send(); trunk/wp-admin/admin-functions.php
r817 r819 723 723 724 724 if ( $categories ) { 725 ob_start(); 725 726 foreach ( $categories as $category ) { 726 727 if ( $category->cat_ID == 0 ) { // HACK, added 2006-05-13 … … 733 734 } 734 735 } 736 $output = ob_get_contents(); 737 ob_end_clean(); 738 739 $output = apply_filters('cat_rows', $output); 740 741 echo $output; 735 742 } else { 736 743 return false; … … 827 834 $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; 828 835 $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts )); 836 $r .= '</a>'; 829 837 } 830 838 $r .= "</td>\n\t\t<td>"; 831 $edit_link = add_query_arg( 'wp_http_referer', wp_specialchars( urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );832 if ( ( is_site_admin() || $current_user->ID == $user_object->ID ) && current_user_can('edit_user', $user_object->ID) )839 if ( ( is_site_admin() || $current_user->ID == $user_object->ID ) && current_user_can( 'edit_user', $user_object->ID ) ) { 840 $edit_link = wp_specialchars( add_query_arg( 'wp_http_referer', urlencode( stripslashes( $_SERVER['REQUEST_URI'] ) ), "user-edit.php?user_id=$user_object->ID" ) ); 833 841 $r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>"; 842 } 834 843 $r .= "</td>\n\t</tr>"; 835 844 return $r; … … 1297 1306 foreach ( $templates as $template ) { 1298 1307 $template_data = implode( '', file( ABSPATH.$template )); 1299 preg_match( "|Template Name:(.* )|i", $template_data, $name );1300 preg_match( "|Description:(.* )|i", $template_data, $description );1308 preg_match( "|Template Name:(.*)|i", $template_data, $name ); 1309 preg_match( "|Description:(.*)|i", $template_data, $description ); 1301 1310 1302 1311 $name = $name[1]; … … 2021 2030 2022 2031 $icon = get_attachment_icon( $post->ID ); 2023 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true);2032 $attachment_data = wp_get_attachment_metadata( $id ); 2024 2033 $thumb = isset( $attachment_data['thumb'] ); 2025 2034 ?> … … 2038 2047 </tr> 2039 2048 <tr> 2040 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to file' ); ?></th>2049 <th scope="row"><?php $thumb ? _e( 'Thumbnail linked to page' ) : _e( 'Image linked to page' ); ?></th> 2041 2050 <td><textarea rows="1" cols="40" type="text" class="attachmentlinks" readonly="readonly"><a href="<?php echo get_attachment_link( $post->ID ) ?>" rel="attachment wp-att-<?php echo $post->ID; ?>"><?php echo $icon ?></a></textarea></td> 2042 2051 </tr> trunk/wp-admin/cat-js.php
r816 r819 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 echo js_escape(__('Add')); ?>"/><span id="howto"><?php js_escape(__('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 echo 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/edit-category-form.php
r810 r819 6 6 $action = 'editedcat'; 7 7 $nonce_action = 'update-category_' . $cat_ID; 8 do_action('edit_category_form_pre', $category); 8 9 } else { 9 10 $heading = __('Add Category'); … … 12 13 $action = 'addcat'; 13 14 $nonce_action = 'add-category'; 15 do_action('add_category_form_pre', $category); 14 16 } 15 17 ?> … … 17 19 <div class="wrap"> 18 20 <h2><?php echo $heading ?></h2> 21 <div id="ajax-response"></div> 19 22 <?php echo $form ?> 20 23 <input type="hidden" name="action" value="<?php echo $action ?>" /> … … 40 43 <?php autocomplete_textbox( "wpmu-edit.php?action=searchcategories&search=", "cat_name", "searchresults" ); ?> 41 44 <p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p> 42 <div id="ajax-response"></div>43 45 <?php do_action('edit_category_form', $category); ?> 44 46 </form> trunk/wp-admin/edit-comments.php
r816 r819 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, '" . 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> ";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 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>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 sprintf(js_escape(__("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="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php echo js_escape(__("Please select some comments to mark as spam")); ?>'); return false } return confirm('<?php echo sprintf(js_escape(__("You are about to mark %s comments as spam \n 'Cancel' to stop, 'OK' to mark as spam.")), "' + numchecked + '"); ?>')" /></p> 234 234 </form> 235 235 <div id="ajax-response"></div> trunk/wp-admin/edit-form-advanced.php
r810 r819 250 250 251 251 <?php if ('edit' == $action) : $delete_nonce = wp_create_nonce( 'delete-post_' . $post_ID ); ?> 252 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . sprintf(__("You are about to delete this post \'%s\'\\n \'Cancel\' to stop, \'OK\' to delete."), js_escape($post->post_title)) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> />252 <input name="deletepost" class="button delete" type="submit" id="deletepost" tabindex="10" value="<?php _e('Delete this post') ?>" <?php echo "onclick=\"if ( confirm('" . js_escape(sprintf(__("You are about to delete this post '%s'\n 'Cancel' to stop, 'OK' to delete."), $post->post_title )) . "') ) { document.forms.post._wpnonce.value = '$delete_nonce'; return true;}return false;\""; ?> /> 253 253 <?php endif; ?> 254 254 trunk/wp-admin/edit-form-comment.php
r810 r819 31 31 </fieldset> 32 32 <fieldset id="uridiv"> 33 <legend><label for=" URL"><?php _e('URL:') ?></label></legend>33 <legend><label for="newcomment_author_url"><?php _e('URL:') ?></label></legend> 34 34 <div> 35 35 <input type="text" id="newcomment_author_url" name="newcomment_author_url" size="35" value="<?php echo $comment->comment_author_url ?>" tabindex="3" id="URL" /> trunk/wp-admin/edit.php
r816 r819 283 283 <?php 284 284 if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 285 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID." \'>" . __('Edit') . '</a>';286 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $post->ID . '&c omment=' . $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> ';285 echo " <a href='comment.php?action=editcomment&c=".$comment->comment_ID."'>" . __('Edit') . '</a>'; 286 echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&p=' . $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> '; 287 287 if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 288 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $post->ID . '&c omment=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>';289 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $post->ID . '&c omment=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>';288 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'unapprove-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Unapprove') . '</a> </span>'; 289 echo '<span class="approve"> | <a href="' . wp_nonce_url('comment.php?action=approvecomment&p=' . $post->ID . '&c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 290 290 } 291 echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&dt=spam&p=".$comment->comment_post_ID."&c omment=".$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> ]";291 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> ]"; 292 292 } // end if any comments to show 293 293 ?> trunk/wp-admin/export.php
r817 r819 13 13 <h2><?php _e('Export'); ?></h2> 14 14 <div class="narrow"> 15 <p><?php _e('When you click the button below WordPress will create a XML file for you to save to your computer.'); ?></p>15 <p><?php _e('When you click the button below WordPress will create an XML file for you to save to your computer.'); ?></p> 16 16 <p><?php _e('This format, which we call WordPress eXtended RSS or WXR, will contain your posts, comments, custom fields, and categories.'); ?></p> 17 <p><?php _e('Once you\'ve saved the download file, you can use the Import function on another WordPress blog to import this blog.'); ?></p> 17 18 <form action="" method="get"> 18 19 <h3><?php _e('Optional options'); ?></h3> trunk/wp-admin/import.php
r638 r819 8 8 <div class="wrap"> 9 9 <h2><?php _e('Import'); ?></h2> 10 <p><?php _e('If you have posts or comments in another system WordPress can import them into your currentblog. To get started, choose a system to import from below:'); ?></p>10 <p><?php _e('If you have posts or comments in another system, WordPress can import those into this blog. To get started, choose a system to import from below:'); ?></p> 11 11 12 12 <?php trunk/wp-admin/import/blogger.php
r816 r819 8 8 // Shows the welcome screen and the magic iframe. 9 9 function greet() { 10 $title = __('Import Blogger ');10 $title = __('Import Blogger or Blogspot'); 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.'); … … 671 671 $blogger_import = new Blogger_Import(); 672 672 673 register_importer('blogger', __('Blogger and Blogspot'), __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start'));673 register_importer('blogger', __('Blogger or Blog*Spot'), __('Import posts, comments, and users from a Blogger or Blog*Spot blog'), array ($blogger_import, 'start')); 674 674 675 675 ?> trunk/wp-admin/import/dotclear.php
r810 r819 1 1 <?php 2 2 /* 3 * Dot clear import plugin3 * DotClear import plugin 4 4 * by Thomas Quinot - http://thomas.quinot.org/ 5 5 */ … … 297 297 $dcid2wpid[$user_id] = $ret_id; 298 298 299 // Set Dot clear-to-WordPress permissions translation299 // Set DotClear-to-WordPress permissions translation 300 300 301 301 // Update Usermeta Data … … 346 346 extract($post); 347 347 348 // Set Dot clear-to-WordPress status translation348 // Set DotClear-to-WordPress status translation 349 349 $stattrans = array(0 => 'draft', 1 => 'publish'); 350 350 $comment_status_map = array (0 => 'closed', 1 => 'open'); … … 648 648 { 649 649 echo '<table class="editform">'; 650 printf('<tr><th><label for="dbuser">%s</label></th><td><input type="text" name="dbuser" id="dbuser" /></td></tr>', __('Dot clear Database User:'));650 printf('<tr><th><label for="dbuser">%s</label></th><td><input type="text" name="dbuser" id="dbuser" /></td></tr>', __('DotClear Database User:')); 651 651 printf('<tr><th><label for="dbpass">%s</label></th><td><input type="password" name="dbpass" id="dbpass" /></td></tr>', __('DotClear Database Password:')); 652 printf('<tr><th><label for="dbname">%s</label></th><td><input type="text" name="dbname" id="dbname" /></td></tr>', __('Dot clear Database Name:'));652 printf('<tr><th><label for="dbname">%s</label></th><td><input type="text" name="dbname" id="dbname" /></td></tr>', __('DotClear Database Name:')); 653 653 printf('<tr><th><label for="dbhost">%s</label></th><td><input type="text" name="dbhost" nameid="dbhost" value="localhost" /></td></tr>', __('DotClear Database Host:')); 654 654 printf('<tr><th><label for="dbprefix">%s</label></th><td><input type="text" name="dbprefix" id="dbprefix" value="dc_"/></td></tr>', __('DotClear Table prefix:')); … … 745 745 746 746 $dc_import = new Dotclear_Import(); 747 register_importer('dotclear', __('DotClear'), __('Import posts from a DotClear Blog'), array ($dc_import, 'dispatch'));747 register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog'), array ($dc_import, 'dispatch')); 748 748 ?> trunk/wp-admin/import/greymatter.php
r810 r819 7 7 function header() { 8 8 echo '<div class="wrap">'; 9 echo '<h2>'.__('Import Grey matter').'</h2>';9 echo '<h2>'.__('Import GreyMatter').'</h2>'; 10 10 } 11 11 … … 282 282 </ul><strong><?php _e('Done') ?></strong></li></ul> 283 283 <p> </p> 284 <p><?php _e('Completed Grey matter import!') ?></p>284 <p><?php _e('Completed GreyMatter import!') ?></p> 285 285 <?php 286 286 $this->footer(); trunk/wp-admin/import/livejournal.php
r793 r819 22 22 function greet() { 23 23 echo '<div class="narrow">'; 24 echo '<p>'.__('Howdy! This importer allows you to extract posts from LiveJournal XML export file into your blog. Pick a LiveJournal file to upload and click Import.').'</p>'; 24 echo '<p>'.__('Howdy! Upload your LiveJournal XML export file and we’ll import the posts into this blog.').'</p>'; 25 echo '<p>'.__('Choose a LiveJournal XML file to upload, then click Upload file and import.').'</p>'; 25 26 wp_import_upload_form("admin.php?import=livejournal&step=1"); 26 27 echo '</div>'; … … 167 168 $livejournal_import = new LJ_Import(); 168 169 169 register_importer('livejournal', __('LiveJournal'), __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch'));170 register_importer('livejournal', __('LiveJournal'), __('Import posts from a LiveJournal XML export file'), array ($livejournal_import, 'dispatch')); 170 171 ?> trunk/wp-admin/import/mt.php
r810 r819 12 12 function header() { 13 13 echo '<div class="wrap">'; 14 echo '<h2>'.__('Import Movable Type andTypePad').'</h2>';14 echo '<h2>'.__('Import Movable Type or TypePad').'</h2>'; 15 15 } 16 16 … … 23 23 ?> 24 24 <div class="narrow"> 25 <p><?php _e('Howdy! We’re about to begin the process to import all of your Movable Type entries into WordPress. To begin, select a file to upload and click Import.'); ?></p>25 <p><?php _e('Howdy! We’re about to begin importing all of your Movable Type or Typepad entries into WordPress. To begin, choose a file to upload and click Upload file and import.'); ?></p> 26 26 <?php wp_import_upload_form( add_query_arg('step', 1) ); ?> 27 27 <p><?php _e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if—for whatever reason—it doesn\'t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.'); ?> </p> … … 96 96 $selectnames = array (); 97 97 98 foreach ($_POST['user'] as $key => $line) { 99 $newname = trim(stripslashes($line)); 100 if ($newname == '') 101 $newname = 'left_blank'; //passing author names from step 1 to step 2 is accomplished by using POST. left_blank denotes an empty entry in the form. 102 array_push($formnames, "$newname"); 103 } // $formnames is the array with the form entered names 104 98 105 foreach ($_POST['userselect'] as $user => $key) { 99 106 $selected = trim(stripslashes($key)); … … 132 139 } 133 140 134 echo '<input type="submit" value=" Submit">'.'<br/>';141 echo '<input type="submit" value="'.__('Submit').'">'.'<br/>'; 135 142 echo '</form>'; 136 143 echo '</ol></div>'; … … 409 416 $mt_import = new MT_Import(); 410 417 411 register_importer('mt', __('Movable Type and TypePad'), __('Import s <strong>posts and comments</strong> from your Movable Type or TypePad blog'), array ($mt_import, 'dispatch'));418 register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or Typepad blog'), array ($mt_import, 'dispatch')); 412 419 ?> trunk/wp-admin/import/rss.php
r793 r819 23 23 function greet() { 24 24 echo '<div class="narrow">'; 25 echo '<p>'.__('Howdy! This importer allows you to extract posts from an yRSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'</p>';25 echo '<p>'.__('Howdy! This importer allows you to extract posts from an RSS 2.0 file into your blog. This is useful if you want to import your posts from a system that is not handled by a custom import tool. Pick an RSS file to upload and click Import.').'</p>'; 26 26 wp_import_upload_form("admin.php?import=rss&step=1"); 27 27 echo '</div>'; trunk/wp-admin/import/textpattern.php
r810 r819 53 53 function greet() { 54 54 echo '<div class="narrow">'; 55 echo '<p>'.__('Howdy! This importer allows you to extract posts from any Textpattern 4.0.2+ into your blog. This has not been tested on previous versions of Textpattern. Mileage may vary.').'</p>'; 55 echo '<p>'.__('Howdy! This imports categories, users, posts, comments, and links from any Textpattern 4.0.2+ into this blog.').'</p>'; 56 echo '<p>'.__('This has not been tested on previous versions of Textpattern. Mileage may vary.').'</p>'; 56 57 echo '<p>'.__('Your Textpattern Configuration settings are as follows:').'</p>'; 57 58 echo '<form action="admin.php?import=textpattern&step=1" method="post">'; … … 661 662 662 663 $txp_import = new Textpattern_Import(); 663 register_importer('textpattern', __('Textpattern'), __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch'));664 register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog'), array ($txp_import, 'dispatch')); 664 665 ?> trunk/wp-admin/import/wordpress.php
r816 r819 28 28 echo '<div class="narrow">'; 29 29 echo '<p>'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we’ll import the posts, comments, custom fields, and categories into this blog.').'</p>'; 30 echo '<p>'.__('Choose a WordPress WXR file to upload, then click Upload file and import.').'</p>'; 30 31 wp_import_upload_form("admin.php?import=wordpress&step=1"); 31 32 echo '</div>'; … … 324 325 $wp_import = new WP_Import(); 325 326 326 register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch'));327 register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, pages, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch')); 327 328 328 329 ?> trunk/wp-admin/link-manager.php
r816 r819 74 74 75 75 <h2><?php _e('Blogroll Management'); ?></h2> 76 <p><?php _e('Here you add linksto sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it’s called a “blogroll.”'); ?></p>76 <p><?php _e('Here you <a href="link-add.php">add links</a> to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it’s called a “blogroll.”'); ?></p> 77 77 <form id="cats" method="get" action=""> 78 78 <p><?php … … 94 94 <input type="submit" name="action" value="<?php _e('Update »') ?>" /></p> 95 95 </form> 96 <?php 97 $link_columns = array( 98 'name' => '<th width="15%">' . __('Name') . '</th>', 99 'url' => '<th>' . __('URL') . '</th>', 100 'categories' => '<th>' . __('Categories') . '</th>', 101 'rel' => '<th style="text-align: center">' . __('rel') . '</th>', 102 'visible' => '<th style="text-align: center">' . __('Visible') . '</th>', 103 'action' => '<th colspan="2" style="text-align: center">' . __('Action') . '</th>', 104 ); 105 $link_columns = apply_filters('manage_link_columns', $link_columns); 106 ?> 107 108 <?php 109 if ( 'all' == $cat_id ) 110 $cat_id = ''; 111 $links = get_bookmarks( "category=$cat_id&hide_invisible=0&orderby=$sqlorderby&hide_empty=0" ); 112 if ( $links ) { 113 ?> 96 114 97 115 <form id="links" method="post" action="link.php"> … … 104 122 <thead> 105 123 <tr> 106 <th width="15%"><?php _e('Name') ?></th> 107 <th><?php _e('URL') ?></th> 108 <th><?php _e('Categories') ?></th> 109 <th style="text-align: center"><?php _e('rel') ?></th> 110 <th style="text-align: center"><?php _e('Visible') ?></th> 111 <th colspan="2" style="text-align: center"><?php _e('Action') ?></th> 112 <th style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('links'));" /></th> 124 <?php foreach($link_columns as $column_display_name) { 125 echo $column_display_name; 126 } ?> 127 <th style="text-align: center"><input type="checkbox" onclick="checkAll(document.getElementById('links'));" /></th> 113 128 </tr> 114 129 </thead> 115 130 <tbody id="the-list"> 116 131 <?php 117 if ( 'all' == $cat_id )118 $cat_id = '';119 $links = get_bookmarks("category=$cat_id&hide_invisible=0&orderby=$sqlorderby&hide_empty=0");120 if ($links)121 132 foreach ($links as $link) { 122 133 $link->link_name = wp_specialchars($link->link_name); … … 134 145 ++ $i; 135 146 $style = ($i % 2) ? '' : ' class="alternate"'; 136 ?> 137 <tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>> 138 <td><strong><?php echo $link->link_name; ?></strong><br /> 139 <?php 140 141 142 echo $link->link_description . "</td>"; 143 echo "<td><a href=\"$link->link_url\" title=\"".sprintf(__('Visit %s'), $link->link_name)."\">$short_url</a></td>"; 144 ?> 145 <td> 146 <?php 147 148 $cat_names = array(); 149 foreach ($link->link_category as $category) { 150 $cat_name = get_the_category_by_ID($category); 151 $cat_name = wp_specialchars($cat_name); 152 if ( $cat_id != $category ) 153 $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>"; 154 $cat_names[] = $cat_name; 147 ?><tr id="link-<?php echo $link->link_id; ?>" valign="middle" <?php echo $style; ?>><?php 148 foreach($link_columns as $column_name=>$column_display_name) { 149 switch($column_name) { 150 case 'name': 151 ?><td><strong><?php echo $link->link_name; ?></strong><br /><?php 152 echo $link->link_description . "</td>"; 153 break; 154 case 'url': 155 echo "<td><a href='$link->link_url' title='".sprintf(__('Visit %s'), $link->link_name)."'>$short_url</a></td>"; 156 break; 157 case 'categories': 158 ?><td><?php 159 $cat_names = array(); 160 foreach ($link->link_category as $category) { 161 $cat_name = get_the_category_by_ID($category); 162 $cat_name = wp_specialchars($cat_name); 163 if ( $cat_id != $category ) 164 $cat_name = "<a href='link-manager.php?cat_id=$category'>$cat_name</a>"; 165 $cat_names[] = $cat_name; 166 } 167 echo implode(', ', $cat_names); 168 ?> </td><?php 169 break; 170 case 'rel': 171 ?><td><?php echo $link->link_rel; ?></td><?php 172 break; 173 case 'visible': 174 ?><td align='center'><?php echo $visible; ?></td><?php 175 break; 176 case 'action': 177 echo '<td><a href="link.php?link_id='.$link->link_id.'&action=edit" class="edit">'.__('Edit').'</a></td>'; 178 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>'; 179 break; 180 default: 181 ?> 182 <td><?php do_action('manage_link_custom_column', $column_name, $id); ?></td> 183 <?php 184 break; 185 186 } 155 187 } 156 echo implode(', ', $cat_names);157 ?>158 </td>159 <td><?php echo $link->link_rel; ?></td>160 <td align='center'><?php echo $visible; ?></td>161 <?php162 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 , '".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 188 echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>'; 166 189 echo "\n </tr>\n"; 167 190 } 191 } 168 192 ?> 169 193 </tbody> … … 172 196 <div id="ajax-response"></div> 173 197 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>198 <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 199 </form> 176 </div>177 200 178 201 <?php … … 188 211 } 189 212 wp_cache_set( "checked_bookmarks_table", "1", "options" ); 190 } 191 192 ?>213 } ?> 214 215 </div> 193 216 194 217 <?php include('admin-footer.php'); ?> trunk/wp-admin/page.php
r797 r819 77 77 78 78 // Update the thumbnail filename 79 $ oldmeta = $newmeta = get_post_meta($page_id, '_wp_attachment_metadata', true);79 $newmeta = wp_get_attachment_metadata( $page_id, true ); 80 80 $newmeta['thumb'] = $_POST['thumb']; 81 81 82 if ( '' !== $oldmeta ) 83 update_post_meta($page_id, '_wp_attachment_metadata', $newmeta, $oldmeta); 84 else 85 add_post_meta($page_id, '_wp_attachment_metadata', $newmeta); 82 wp_update_attachment_metadata( $newmeta ); 86 83 87 84 case 'editpost': trunk/wp-admin/post.php
r810 r819 79 79 80 80 // Update the thumbnail filename 81 $ oldmeta = $newmeta = get_post_meta($post_id, '_wp_attachment_metadata', true);81 $newmeta = wp_get_attachment_metadata( $post_id, true ); 82 82 $newmeta['thumb'] = $_POST['thumb']; 83 83 84 if ( '' !== $oldmeta ) 85 update_post_meta($post_id, '_wp_attachment_metadata', $newmeta, $oldmeta); 86 else 87 add_post_meta($post_id, '_wp_attachment_metadata', $newmeta); 84 wp_update_attachment_metadata( $post_id, $newmeta ); 88 85 89 86 case 'editpost': trunk/wp-admin/upgrade-functions.php
r816 r819 476 476 $meta = get_post_meta($object->ID, 'imagedata', true); 477 477 if ( ! empty($meta['file']) ) 478 add_post_meta($object->ID, '_wp_attached_file', $meta['file']);478 update_attached_file( $object->ID, $meta['file'] ); 479 479 } 480 480 } … … 556 556 } 557 557 } 558 559 function upgrade_old_slugs() { 560 // upgrade people who were using the Redirect Old Slugs plugin 561 global $wpdb; 562 $wpdb->query("UPDATE $wpdb->postmeta SET meta_key = '_wp_old_slug' WHERE meta_key = 'old_slug'"); 563 } 564 558 565 559 566 // The functions we use to actually do stuff trunk/wp-admin/upload-functions.php
r810 r819 3 3 global $post; 4 4 $id = get_the_ID(); 5 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true);5 $attachment_data = wp_get_attachment_metadata( $id ); 6 6 if ( isset($attachment_data['width']) ) 7 7 list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128); … … 58 58 global $style, $post_id, $style; 59 59 $id = get_the_ID(); 60 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true);60 $attachment_data = wp_get_attachment_metadata( $id ); 61 61 ?> 62 62 <div id="upload-file"> … … 99 99 if ( $id ) : 100 100 $attachment = get_post_to_edit( $id ); 101 $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true);101 $attachment_data = wp_get_attachment_metadata( $id ); 102 102 ?> 103 103 <div id="file-title"> … … 230 230 $imagedata['file'] = $file; 231 231 232 add_post_meta($id, '_wp_attachment_metadata', $imagedata);232 wp_update_attachment_metadata( $id, $imagedata ); 233 233 234 234 if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { … … 241 241 $newdata = $imagedata; 242 242 $newdata['thumb'] = basename($thumb); 243 update_post_meta($id, '_wp_attachment_metadata', $newdata, $imagedata);243 wp_update_attachment_metadata( $id, $newdata ); 244 244 } else {
