Changeset 819

Show
Ignore:
Timestamp:
12/07/06 10:17:25 (2 years ago)
Author:
donncha
Message:

WP Merge

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-ajax.php

    r817 r819  
    148148                'id' => $cat->cat_ID, 
    149149                '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)
    151151        ) ); 
    152152        $x->send(); 
     
    212212                exit; 
    213213        } 
     214        $user_object = new WP_User( $user_id ); 
    214215        $x = new WP_Ajax_Response( array( 
    215216                'what' => 'user', 
    216217                '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)) 
    218220        ) ); 
    219221        $x->send(); 
  • trunk/wp-admin/admin-functions.php

    r817 r819  
    723723 
    724724        if ( $categories ) { 
     725                ob_start(); 
    725726                foreach ( $categories as $category ) { 
    726727                        if ( $category->cat_ID == 0 ) { // HACK, added 2006-05-13 
     
    733734                        } 
    734735                } 
     736                $output = ob_get_contents(); 
     737                ob_end_clean(); 
     738                 
     739                $output = apply_filters('cat_rows', $output); 
     740 
     741                echo $output; 
    735742        } else { 
    736743                return false; 
     
    827834                $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>"; 
    828835                $r .= sprintf( __('View %1$s %2$s' ), $numposts, __ngettext( 'post', 'posts', $numposts )); 
     836                $r .= '</a>'; 
    829837        } 
    830838        $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" ) ); 
    833841                $r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>"; 
     842        } 
    834843        $r .= "</td>\n\t</tr>"; 
    835844        return $r; 
     
    12971306                foreach ( $templates as $template ) { 
    12981307                        $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 ); 
    13011310 
    13021311                        $name = $name[1]; 
     
    20212030 
    20222031        $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 ); 
    20242033        $thumb = isset( $attachment_data['thumb'] ); 
    20252034?> 
     
    20382047        </tr> 
    20392048        <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> 
    20412050                <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> 
    20422051        </tr> 
  • trunk/wp-admin/cat-js.php

    r816 r819  
    99        if ( !jaxcat ) 
    1010                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>'); 
    1212        $('newcat').onkeypress = function(e) { return killSubmit("catList.ajaxAdder('category','jaxcat');", e); }; 
    1313        $('catadd').onclick = function() { catList.ajaxAdder('category', 'jaxcat'); }; 
  • trunk/wp-admin/edit-category-form.php

    r810 r819  
    66        $action = 'editedcat'; 
    77        $nonce_action = 'update-category_' . $cat_ID; 
     8        do_action('edit_category_form_pre', $category); 
    89} else { 
    910        $heading = __('Add Category'); 
     
    1213        $action = 'addcat'; 
    1314        $nonce_action = 'add-category'; 
     15        do_action('add_category_form_pre', $category); 
    1416} 
    1517?> 
     
    1719<div class="wrap"> 
    1820<h2><?php echo $heading ?></h2> 
     21<div id="ajax-response"></div> 
    1922<?php echo $form ?> 
    2023<input type="hidden" name="action" value="<?php echo $action ?>" /> 
     
    4043<?php autocomplete_textbox( "wpmu-edit.php?action=searchcategories&search=", "cat_name", "searchresults" ); ?> 
    4144<p class="submit"><input type="submit" name="submit" value="<?php echo $submit_text ?>" /></p> 
    42 <div id="ajax-response"></div> 
    4345<?php do_action('edit_category_form', $category); ?> 
    4446</form> 
  • trunk/wp-admin/edit-comments.php

    r816 r819  
    224224        echo "<a href='comment.php?action=editcomment&amp;c=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td> 
    225225    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    226                 echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;c=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . js_escape(sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $comment->comment_author ))  . "', theCommentList );\" class='delete'>" . __('Delete') . "</a> "; 
     226                echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;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> "; 
    227227                } ?></td> 
    228228  </tr> 
     
    230230                } // end foreach 
    231231        ?></table> 
    232 <p class="submit"><input type="submit" name="delete_button" class="delete" value="<?php _e('Delete Checked Comments &raquo;') ?>" 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 &raquo;') ?>" 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 &raquo;') ?>" 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 &raquo;') ?>" 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> 
    234234  </form> 
    235235<div id="ajax-response"></div> 
  • trunk/wp-admin/edit-form-advanced.php

    r810 r819  
    250250 
    251251<?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;\""; ?> /> 
    253253<?php endif; ?> 
    254254 
  • trunk/wp-admin/edit-form-comment.php

    r810 r819  
    3131</fieldset> 
    3232<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> 
    3434                <div> 
    3535                  <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  
    283283<?php 
    284284if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    285         echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."\'>" .  __('Edit') . '</a>'; 
    286         echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $post->ID . '&amp;comment=' . $comment->comment_ID, 'delete-comment_' . $comment->comment_ID) . '" onclick="return deleteSomething( \'comment\', ' . $comment->comment_ID . ', \'' . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 
     285        echo " <a href='comment.php?action=editcomment&amp;c=".$comment->comment_ID."'>" .  __('Edit') . '</a>'; 
     286        echo ' | <a href="' . wp_nonce_url('comment.php?action=deletecomment&amp;p=' . $post->ID . '&amp;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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape($comment->comment_author)) . "', theCommentList );\">" . __('Delete') . '</a> '; 
    287287        if ( ('none' != $comment_status) && ( current_user_can('moderate_comments') ) ) { 
    288                 echo '<span class="unapprove"> | <a href="' . wp_nonce_url('comment.php?action=unapprovecomment&amp;p=' . $post->ID . '&amp;comment=' . $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&amp;p=' . $post->ID . '&amp;comment=' . $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&amp;p=' . $post->ID . '&amp;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&amp;p=' . $post->ID . '&amp;c=' . $comment->comment_ID, 'approve-comment_' . $comment->comment_ID) . '" onclick="return dimSomething( \'comment\', ' . $comment->comment_ID . ', \'unapproved\', theCommentList );">' . __('Approve') . '</a> </span>'; 
    290290        } 
    291         echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=".$comment->comment_post_ID."&amp;comment=".$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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), js_escape( $comment->comment_author))  . "', theCommentList );\">" . __('Spam') . "</a> ]"; 
     291        echo " | <a href=\"" . wp_nonce_url("comment.php?action=deletecomment&amp;dt=spam&amp;p=".$comment->comment_post_ID."&amp;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 &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to mark as spam."), js_escape( $comment->comment_author))  . "', theCommentList );\">" . __('Spam') . "</a> ]"; 
    292292} // end if any comments to show 
    293293?> 
  • trunk/wp-admin/export.php

    r817 r819  
    1313<h2><?php _e('Export'); ?></h2> 
    1414<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> 
    1616<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> 
    1718<form action="" method="get"> 
    1819<h3><?php _e('Optional options'); ?></h3> 
  • trunk/wp-admin/import.php

    r638 r819  
    88<div class="wrap"> 
    99<h2><?php _e('Import'); ?></h2> 
    10 <p><?php _e('If you have posts or comments in another system WordPress can import them into your current blog. 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> 
    1111 
    1212<?php 
  • trunk/wp-admin/import/blogger.php

    r816 r819  
    88        // Shows the welcome screen and the magic iframe. 
    99        function greet() { 
    10                 $title = __('Import Blogger'); 
     10                $title = __('Import Blogger or Blogspot'); 
    1111                $welcome = __('Howdy! This importer allows you to import posts and comments from your Blogger account into your WordPress blog.'); 
    1212                $noiframes = __('This feature requires iframe support.'); 
     
    671671$blogger_import = new Blogger_Import(); 
    672672 
    673 register_importer('blogger', __('Blogger and Blogspot'), __('Import <strong>posts and comments</strong> from your Blogger account'), array ($blogger_import, 'start')); 
     673register_importer('blogger', __('Blogger or Blog*Spot'), __('Import posts, comments, and users from a Blogger or Blog*Spot blog'), array ($blogger_import, 'start')); 
    674674 
    675675?> 
  • trunk/wp-admin/import/dotclear.php

    r810 r819  
    11<?php 
    22/* 
    3  * Dotclear import plugin 
     3 * DotClear import plugin 
    44 * by Thomas Quinot - http://thomas.quinot.org/ 
    55 */ 
     
    297297                                $dcid2wpid[$user_id] = $ret_id; 
    298298 
    299                                 // Set Dotclear-to-WordPress permissions translation 
     299                                // Set DotClear-to-WordPress permissions translation 
    300300 
    301301                                // Update Usermeta Data 
     
    346346                                extract($post); 
    347347 
    348                                 // Set Dotclear-to-WordPress status translation 
     348                                // Set DotClear-to-WordPress status translation 
    349349                                $stattrans = array(0 => 'draft', 1 => 'publish'); 
    350350                                $comment_status_map = array (0 => 'closed', 1 => 'open'); 
     
    648648        { 
    649649                echo '<table class="editform">'; 
    650                 printf('<tr><th><label for="dbuser">%s</label></th><td><input type="text" name="dbuser" id="dbuser" /></td></tr>', __('Dotclear 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:')); 
    651651                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>', __('Dotclear 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:')); 
    653653                printf('<tr><th><label for="dbhost">%s</label></th><td><input type="text" name="dbhost" nameid="dbhost" value="localhost" /></td></tr>', __('DotClear Database Host:')); 
    654654                printf('<tr><th><label for="dbprefix">%s</label></th><td><input type="text" name="dbprefix" id="dbprefix" value="dc_"/></td></tr>', __('DotClear Table prefix:')); 
     
    745745 
    746746$dc_import = new Dotclear_Import(); 
    747 register_importer('dotclear', __('DotClear'), __('Import posts from a DotClear Blog'), array ($dc_import, 'dispatch')); 
     747register_importer('dotclear', __('DotClear'), __('Import categories, users, posts, comments, and links from a DotClear blog'), array ($dc_import, 'dispatch')); 
    748748?> 
  • trunk/wp-admin/import/greymatter.php

    r810 r819  
    77        function header() { 
    88                echo '<div class="wrap">'; 
    9                 echo '<h2>'.__('Import Greymatter').'</h2>'; 
     9                echo '<h2>'.__('Import GreyMatter').'</h2>'; 
    1010        } 
    1111 
     
    282282</ul><strong><?php _e('Done') ?></strong></li></ul> 
    283283<p>&nbsp;</p> 
    284 <p><?php _e('Completed Greymatter import!') ?></p> 
     284<p><?php _e('Completed GreyMatter import!') ?></p> 
    285285<?php 
    286286        $this->footer(); 
  • trunk/wp-admin/import/livejournal.php

    r793 r819  
    2222        function greet() { 
    2323                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&#8217;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>'; 
    2526                wp_import_upload_form("admin.php?import=livejournal&amp;step=1"); 
    2627                echo '</div>'; 
     
    167168$livejournal_import = new LJ_Import(); 
    168169 
    169 register_importer('livejournal', __('LiveJournal'), __('Import posts from LiveJournal'), array ($livejournal_import, 'dispatch')); 
     170register_importer('livejournal', __('LiveJournal'), __('Import posts from a LiveJournal XML export file'), array ($livejournal_import, 'dispatch')); 
    170171?> 
  • trunk/wp-admin/import/mt.php

    r810 r819  
    1212        function header() { 
    1313                echo '<div class="wrap">'; 
    14                 echo '<h2>'.__('Import Movable Type and TypePad').'</h2>'; 
     14                echo '<h2>'.__('Import Movable Type or TypePad').'</h2>'; 
    1515        } 
    1616 
     
    2323?> 
    2424<div class="narrow"> 
    25 <p><?php _e('Howdy! We&#8217;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&#8217;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> 
    2626<?php wp_import_upload_form( add_query_arg('step', 1) ); ?> 
    2727        <p><?php _e('The importer is smart enough not to import duplicates, so you can run this multiple times without worry if&#8212;for whatever reason&#8212;it doesn\'t finish. If you get an <strong>out of memory</strong> error try splitting up the import file into pieces.'); ?> </p> 
     
    9696                $selectnames = array (); 
    9797 
     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 
    98105                foreach ($_POST['userselect'] as $user => $key) { 
    99106                        $selected = trim(stripslashes($key)); 
     
    132139                } 
    133140 
    134                 echo '<input type="submit" value="Submit">'.'<br/>'; 
     141                echo '<input type="submit" value="'.__('Submit').'">'.'<br/>'; 
    135142                echo '</form>'; 
    136143                echo '</ol></div>'; 
     
    409416$mt_import = new MT_Import(); 
    410417 
    411 register_importer('mt', __('Movable Type and TypePad'), __('Imports <strong>posts and comments</strong> from your Movable Type or TypePad blog'), array ($mt_import, 'dispatch')); 
     418register_importer('mt', __('Movable Type and TypePad'), __('Import posts and comments from a Movable Type or Typepad blog'), array ($mt_import, 'dispatch')); 
    412419?> 
  • trunk/wp-admin/import/rss.php

    r793 r819  
    2323        function greet() { 
    2424                echo '<div class="narrow">'; 
    25                 echo '<p>'.__('Howdy! This importer allows you to extract posts from any 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>'; 
     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>'; 
    2626                wp_import_upload_form("admin.php?import=rss&amp;step=1"); 
    2727                echo '</div>'; 
  • trunk/wp-admin/import/textpattern.php

    r810 r819  
    5353        function greet() { 
    5454                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>'; 
    5657                echo '<p>'.__('Your Textpattern Configuration settings are as follows:').'</p>'; 
    5758                echo '<form action="admin.php?import=textpattern&amp;step=1" method="post">'; 
     
    661662 
    662663$txp_import = new Textpattern_Import(); 
    663 register_importer('textpattern', __('Textpattern'), __('Import posts from a Textpattern Blog'), array ($txp_import, 'dispatch')); 
     664register_importer('textpattern', __('Textpattern'), __('Import categories, users, posts, comments, and links from a Textpattern blog'), array ($txp_import, 'dispatch')); 
    664665?> 
  • trunk/wp-admin/import/wordpress.php

    r816 r819  
    2828                echo '<div class="narrow">'; 
    2929                echo '<p>'.__('Howdy! Upload your WordPress eXtended RSS (WXR) file and we&#8217;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>'; 
    3031                wp_import_upload_form("admin.php?import=wordpress&amp;step=1"); 
    3132                echo '</div>'; 
     
    324325$wp_import = new WP_Import(); 
    325326 
    326 register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch')); 
     327register_importer('wordpress', 'WordPress', __('Import <strong>posts, comments, custom fields, pages, and categories</strong> from a WordPress export file'), array ($wp_import, 'dispatch')); 
    327328 
    328329?> 
  • trunk/wp-admin/link-manager.php

    r816 r819  
    7474 
    7575<h2><?php _e('Blogroll Management'); ?></h2> 
    76 <p><?php _e('Here you add links 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&#8217;s called a &#8220;blogroll.&#8221;'); ?></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&#8217;s called a &#8220;blogroll.&#8221;'); ?></p> 
    7777<form id="cats" method="get" action=""> 
    7878<p><?php 
     
    9494<input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" /></p> 
    9595</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 
     109if ( 'all' == $cat_id ) 
     110        $cat_id = ''; 
     111$links = get_bookmarks( "category=$cat_id&hide_invisible=0&orderby=$sqlorderby&hide_empty=0" ); 
     112if ( $links ) { 
     113?> 
    96114 
    97115<form id="links" method="post" action="link.php"> 
     
    104122        <thead> 
    105123        <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> 
    113128        </tr> 
    114129        </thead> 
    115130        <tbody id="the-list"> 
    116131<?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) 
    121132        foreach ($links as $link) { 
    122133                $link->link_name = wp_specialchars($link->link_name); 
     
    134145                ++ $i; 
    135146                $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.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>'; 
     178                                        echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\n&quot;Cancel&quot; to stop, &quot;OK&quot; 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                        } 
    155187                } 
    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 <?php 
    162  
    163                 echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>'; 
    164                 echo '<td><a href="' . wp_nonce_url('link.php?link_id='.$link->link_id.'&amp;action=delete', 'delete-bookmark_' . $link->link_id ) . '"'." onclick=\"return deleteSomething( 'link', $link->link_id , '".js_escape(sprintf(__("You are about to delete the &quot;%s&quot; link to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), $link->link_name, $link->link_url )).'\' );" class="delete">'.__('Delete').'</a></td>'; 
    165188                echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>'; 
    166189                echo "\n    </tr>\n"; 
    167190        } 
     191} 
    168192?> 
    169193        </tbody> 
     
    172196<div id="ajax-response"></div> 
    173197 
    174 <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Links') ?> &raquo;" 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') ?> &raquo;" onclick="return confirm('<?php echo js_escape(__("You are about to delete these links permanently.\n'Cancel' to stop, 'OK' to delete.")); ?>')" /></p> 
    175199</form> 
    176 </div> 
    177200 
    178201<?php 
     
    188211        } 
    189212        wp_cache_set( "checked_bookmarks_table", "1", "options" ); 
    190 } 
    191  
    192 ?
     213} ?> 
     214 
     215</div
    193216 
    194217<?php include('admin-footer.php'); ?> 
  • trunk/wp-admin/page.php

    r797 r819  
    7777 
    7878        // 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 ); 
    8080        $newmeta['thumb'] = $_POST['thumb']; 
    8181 
    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 ); 
    8683 
    8784case 'editpost': 
  • trunk/wp-admin/post.php

    r810 r819  
    7979 
    8080        // 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 ); 
    8282        $newmeta['thumb'] = $_POST['thumb']; 
    8383 
    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 ); 
    8885 
    8986case 'editpost': 
  • trunk/wp-admin/upgrade-functions.php

    r816 r819  
    476476                        $meta = get_post_meta($object->ID, 'imagedata', true); 
    477477                        if ( ! empty($meta['file']) ) 
    478                                 add_post_meta($object->ID, '_wp_attached_file', $meta['file']); 
     478                                update_attached_file( $object->ID, $meta['file'] ); 
    479479                } 
    480480        } 
     
    556556        } 
    557557} 
     558 
     559function 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 
    558565 
    559566// The functions we use to actually do stuff 
  • trunk/wp-admin/upload-functions.php

    </
    r810 r819  
    33        global $post; 
    44        $id = get_the_ID(); 
    5         $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); 
     5        $attachment_data = wp_get_attachment_metadata( $id ); 
    66        if ( isset($attachment_data['width']) ) 
    77                list($width,$height) = wp_shrink_dimensions($attachment_data['width'], $attachment_data['height'], 171, 128); 
     
    5858        global $style, $post_id, $style; 
    5959        $id = get_the_ID(); 
    60         $attachment_data = get_post_meta( $id, '_wp_attachment_metadata', true ); 
     60        $attachment_data = wp_get_attachment_metadata( $id ); 
    6161?> 
    6262        <div id="upload-file"> 
     
    9999        if ( $id ) : 
    100100                $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 ); 
    102102?> 
    103103                <div id="file-title"> 
     
    230230                        $imagedata['file'] = $file; 
    231231 
    232                         add_post_meta($id, '_wp_attachment_metadata', $imagedata); 
     232                        wp_update_attachment_metadata( $id, $imagedata ); 
    233233 
    234234                        if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) { 
     
    241241                                        $newdata = $imagedata; 
    242242                                        $newdata['thumb'] = basename($thumb); 
    243                                         update_post_meta($id, '_wp_attachment_metadata', $newdata, $imagedata); 
     243                                        wp_update_attachment_metadata( $id, $newdata ); 
    244244                                } else {