Changeset 6726

Show
Ignore:
Timestamp:
02/05/08 06:47:27 (5 months ago)
Author:
ryan
Message:

Trailing whitespace cleanup

Files:

Legend:

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

    r6660 r6726  
    304304    if ( !$link_cat = link_cat_row( $term_id ) ) 
    305305        die('0'); 
    306          
     306 
    307307    $x = new WP_Ajax_Response( array( 
    308308        'what' => 'link-cat', 
  • trunk/wp-admin/edit-page-form.php

    r6712 r6726  
    4949<div id="titlediv"> 
    5050<h3><?php _e('Title') ?></h3> 
    51 <div class="inside">  
     51<div class="inside"> 
    5252  <input type="text" name="post_title" size="30" tabindex="1" value="<?php echo attribute_escape( $post->post_title ); ?>" id="title" /> 
    5353</div> 
  • trunk/wp-admin/edit-pages.php

    r6380 r6726  
    8888  </thead> 
    8989  <tbody id="the-list" class="list:page"> 
    90   <?php page_rows($posts); ?>   
     90  <?php page_rows($posts); ?> 
    9191  </tbody> 
    9292</table> 
  • trunk/wp-admin/edit-tags.php

    r6723 r6726  
    4343    require_once ('admin-header.php'); 
    4444    $tag_ID = (int) $_GET['tag_ID']; 
    45      
    46     $tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit');  
     45 
     46    $tag = get_term($tag_ID, 'post_tag', OBJECT, 'edit'); 
    4747    include('edit-tag-form.php'); 
    4848 
  • trunk/wp-admin/export.php

    r6335 r6726  
    55$parent_file = 'edit.php'; 
    66 
    7 if ( isset( $_GET['download'] ) ) {     
     7if ( isset( $_GET['download'] ) ) { 
    88    export_wp( $_GET['author'] ); 
    99    die(); 
  • trunk/wp-admin/import/blogger.php

    r6607 r6726  
    382382                        $AtomParser->parse( $entry ); 
    383383                        $result = $this->import_post($AtomParser->entry); 
    384                         if ( is_wp_error( $result ) )  
     384                        if ( is_wp_error( $result ) ) 
    385385                            return $result; 
    386386                        unset($AtomParser); 
     
    521521 
    522522            $post_id = wp_insert_post($post); 
    523             if ( is_wp_error( $post_id ) )  
     523            if ( is_wp_error( $post_id ) ) 
    524524                return $post_id; 
    525525 
  • trunk/wp-admin/import/btt.php

    r6682 r6726  
    6262        echo '<p><h3>'.__('Reading Bunny&#8217;s Technorati Tags&#8230;').'</h3></p>'; 
    6363 
    64         // import Bunny's Keywords tags  
     64        // import Bunny's Keywords tags 
    6565        $metakeys = $wpdb->get_results("SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'tags'"); 
    6666        if ( !is_array($metakeys)) { 
  • trunk/wp-admin/import/jkw.php

    r6682 r6726  
    7878        echo '<p><h3>'.__('Reading Jerome&#8217;s Keywords Tags&#8230;').'</h3></p>'; 
    7979 
    80         // import Jerome's Keywords tags  
     80        // import Jerome's Keywords tags 
    8181        $metakeys = $wpdb->get_results("SELECT post_id, meta_id, meta_key, meta_value FROM $wpdb->postmeta WHERE $wpdb->postmeta.meta_key = 'keywords'"); 
    8282        if ( !is_array($metakeys)) { 
     
    118118        echo '<p><h3>'.__('Reading Jerome&#8217;s Keywords Tags&#8230;').'</h3></p>'; 
    119119 
    120         // import Jerome's Keywords tags  
     120        // import Jerome's Keywords tags 
    121121        $tablename = $wpdb->prefix . substr(get_option('jkeywords_keywords_table'), 1, -1); 
    122122        $metakeys = $wpdb->get_results("SELECT post_id, tag_name FROM $tablename"); 
  • trunk/wp-admin/import/mt.php

    r6430 r6726  
    216216            $post->post_author = $this->checkauthor($post->post_author); //just so that if a post already exists, new users are not created by checkauthor 
    217217            $post_id = wp_insert_post($post); 
    218             if ( is_wp_error( $post_id ) )  
     218            if ( is_wp_error( $post_id ) ) 
    219219                return $post_id; 
    220220 
     
    295295                $context = ''; 
    296296                $result = $this->save_post($post, $comments, $pings); 
    297                 if ( is_wp_error( $result ) )  
     297                if ( is_wp_error( $result ) ) 
    298298                    return $result; 
    299299                $post = new StdClass; 
     
    421421        $this->get_authors_from_post(); 
    422422        $result = $this->process_posts(); 
    423         if ( is_wp_error( $result ) )  
     423        if ( is_wp_error( $result ) ) 
    424424            return $result; 
    425425    } 
  • trunk/wp-admin/import/stp.php

    r6430 r6726  
    7171                delete_option('stpimp_posts'); 
    7272            } 
    73              
     73 
    7474            add_option('stpimp_posts', $posts); 
    7575            $count = count($posts); 
     
    8888        echo '<div class="narrow">'; 
    8989        echo '<p><h3>'.__('Adding Tags to Posts&#8230;').'</h3></p>'; 
    90          
     90 
    9191        // run that funky magic! 
    9292        $tags_added = $this->tag2post(); 
    93          
     93 
    9494        echo '<p>' . sprintf( __ngettext('Done! <strong>%s</strong> tags where added!', 'Done! <strong>%s</strong> tags where added!', $tags_added), $tags_added ) . '<br /></p>'; 
    9595        echo '<form action="admin.php?import=stp&amp;step=3" method="post">'; 
  • trunk/wp-admin/import/textpattern.php

    r6472 r6726  
    647647            case 3 : 
    648648                $result = $this->import_posts(); 
    649                 if ( is_wp_error( $result ) )  
     649                if ( is_wp_error( $result ) ) 
    650650                    echo $result->get_error_message(); 
    651651                break; 
  • trunk/wp-admin/import/wordpress.php

    r6565 r6726  
    1010    var $newauthornames = array (); 
    1111    var $allauthornames = array (); 
    12      
     12 
    1313    var $author_ids = array (); 
    1414    var $tags = array (); 
    15      
     15 
    1616    var $j = -1; 
    1717    var $fetch_attachments = false; 
     
    5252        return is_callable('gzopen'); 
    5353    } 
    54      
     54 
    5555    function fopen($filename, $mode='r') { 
    5656        if ( $this->has_gzip() ) 
     
    5858        return fopen($filename, $mode); 
    5959    } 
    60      
     60 
    6161    function feof($fp) { 
    6262        if ( $this->has_gzip() ) 
     
    6464        return feof($fp); 
    6565    } 
    66      
     66 
    6767    function fgets($fp, $len=8192) { 
    6868        if ( $this->has_gzip() ) 
     
    7070        return fgets($fp, $len); 
    7171    } 
    72      
     72 
    7373    function fclose($fp) { 
    7474        if ( $this->has_gzip() ) 
     
    8787            while ( !$this->feof($fp) ) { 
    8888                $importline = rtrim($this->fgets($fp)); 
    89                  
     89 
    9090                // this doesn't check that the file is perfectly valid but will at least confirm that it's not the wrong format altogether 
    9191                if ( !$is_wxr_file && preg_match('|xmlns:wp="http://wordpress[.]org/export/\d+[.]\d+/"|', $importline) ) 
     
    124124 
    125125    } 
    126      
     126 
    127127    function get_wp_authors() { 
    128128        // We need to find unique values of author names, while preserving the order, so this function emulates the unique_value(); php function, without the sorting. 
     
    141141    function get_authors_from_post() { 
    142142        global $current_user; 
    143          
     143 
    144144        // this will populate $this->author_ids with a list of author_names => user_ids 
    145          
     145 
    146146        foreach ( $_POST['author_in'] as $i => $in_author_name ) { 
    147              
     147 
    148148            if ( !empty($_POST['user_select'][$i]) ) { 
    149149                // an existing user was selected in the dropdown list 
     
    154154            elseif ( $this->allow_create_users() ) { 
    155155                // nothing was selected in the dropdown list, so we'll use the name in the text field 
    156                  
     156 
    157157                $new_author_name = trim($_POST['user_create'][$i]); 
    158158                // if the user didn't enter a name, assume they want to use the same name as in the import file 
    159159                if ( empty($new_author_name) ) 
    160160                    $new_author_name = $in_author_name; 
    161                  
     161 
    162162                $user_id = username_exists($new_author_name); 
    163                 if ( !$user_id ) {  
     163                if ( !$user_id ) { 
    164164                    $user_id = wp_create_user($new_author_name, 'changeme'); 
    165165                } 
    166                  
     166 
    167167                $this->author_ids[$in_author_name] = $user_id; 
    168168            } 
    169              
     169 
    170170            // failsafe: if the user_id was invalid, default to the current user 
    171171            if ( empty($this->author_ids[$in_author_name]) ) { 
     
    173173            } 
    174174        } 
    175          
     175 
    176176    } 
    177177 
     
    197197            echo '</li>'; 
    198198        } 
    199          
     199 
    200200        if ( $this->allow_fetch_attachments() ) { 
    201 ?>  
    202 </ol>   
     201?> 
     202</ol> 
    203203<h2><?php _e('Import Attachments'); ?></h2> 
    204204<p> 
     
    209209<?php 
    210210        } 
    211      
     211 
    212212        echo '<input type="submit" value="Submit">'.'<br />'; 
    213213        echo '</form>'; 
    214214 
    215215    } 
    216      
     216 
    217217    function users_form($n, $author) { 
    218          
     218 
    219219        if ( $this->allow_create_users() ) { 
    220220            printf(__('Create user %1$s or map to existing'), ' <input type="text" value="'.$author.'" name="'.'user_create['.intval($n).']'.'" maxlength="30"> <br />'); 
     
    226226        // keep track of $n => $author name 
    227227        echo '<input type="hidden" name="author_in['.intval($n).']" value="'.htmlspecialchars($author).'" />'; 
    228          
     228 
    229229        $users = get_users_of_blog(); 
    230230?><select name="user_select[<?php echo $n; ?>]"> 
     
    253253    function checkauthor($author) { 
    254254        global $current_user; 
    255          
     255 
    256256        if ( !empty($this->author_ids[$author]) ) 
    257257            return $this->author_ids[$author]; 
    258              
     258 
    259259        // failsafe: map to the current user 
    260260        return $current_user->ID; 
     
    335335    function process_post($post) { 
    336336        global $wpdb; 
    337          
     337 
    338338        $post_ID = (int) $this->get_tag( $post, 'wp:post_id' ); 
    339339        if ( $post_ID && !empty($this->post_ids_processed[$post_ID]) ) // Processed already 
     
    358358        $post_content = str_replace('<br>', '<br />', $post_content); 
    359359        $post_content = str_replace('<hr>', '<hr />', $post_content); 
    360          
     360 
    361361        preg_match_all('|<category domain="tag">(.*?)</category>|is', $post, $tags); 
    362362        $tags = $tags[1]; 
     
    378378 
    379379        $post_exists = post_exists($post_title, '', $post_date); 
    380          
     380 
    381381        if ( $post_exists ) { 
    382382            echo '<li>'; 
     
    406406                if ( !$remote_url ) 
    407407                    $remote_url = $guid; 
    408                      
     408 
    409409                $comment_post_ID = $post_id = $this->process_attachment($postdata, $remote_url); 
    410410                if ( !$post_id or is_wp_error($post_id) ) 
     
    415415                $comment_post_ID = $post_id = wp_insert_post($postdata); 
    416416            } 
    417              
     417 
    418418            if ( is_wp_error( $post_id ) ) 
    419419                return $post_id; 
     
    423423                $this->post_ids_processed[intval($post_ID)] = intval($post_id); 
    424424            } 
    425              
     425 
    426426            // Add categories. 
    427427            if (count($categories) > 0) { 
     
    496496            $value = $this->get_tag( $p, 'wp:meta_value' ); 
    497497            $value = stripslashes($value); // add_post_meta() will escape. 
    498              
     498 
    499499            $this->process_post_meta($post_id, $key, $value); 
    500500 
    501501        } } 
    502          
     502 
    503503        do_action('import_post_added', $post_id); 
    504504        print "</li>\n"; 
    505505    } 
    506      
     506 
    507507    function process_post_meta($post_id, $key, $value) { 
    508508        // the filter can return false to skip a particular metadata key 
     
    513513        } 
    514514    } 
    515      
     515 
    516516    function process_attachment($postdata, $remote_url) { 
    517517        if ($this->fetch_attachments and $remote_url) { 
     
    525525                print '('.size_format(filesize($upload['file'])).')'; 
    526526            } 
    527              
     527 
    528528            if ( $info = wp_check_filetype($upload['file']) ) { 
    529529                $postdata['post_mime_type'] = $info['type']; 
     
    533533                return; 
    534534            } 
    535                  
     535 
    536536            $postdata['guid'] = $upload['url']; 
    537537 
     
    539539            $post_id = wp_insert_attachment($postdata, $upload['file']); 
    540540            wp_update_attachment_metadata( $post_id, wp_generate_attachment_metadata( $post_id, $upload['file'] ) ); 
    541              
     541 
    542542            // remap the thumbnail url.  this isn't perfect because we're just guessing the original url. 
    543543            if ( preg_match('@^image/@', $info['type']) && $thumb_url = wp_get_attachment_thumb_url($post_id) ) { 
     
    547547                $this->url_remap[$parts['dirname'] . '/' . $name . '.thumbnail.' . $ext] = $thumb_url; 
    548548            } 
    549              
     549 
    550550            return $post_id; 
    551551        } 
     
    554554        } 
    555555    } 
    556      
     556 
    557557    function fetch_remote_file($post, $url) { 
    558558        $upload = wp_upload_dir($post['post_date']); 
    559          
     559 
    560560        // extract the file name and extension from the url 
    561561        $file_name = basename($url); 
     
    567567            return new WP_Error( 'upload_dir_error', $upload['error'] ); 
    568568        } 
    569          
     569 
    570570        // fetch the remote url and write it to the placeholder file 
    571571        $headers = wp_get_http($url, $upload['file']); 
    572          
     572 
    573573        // make sure the fetch was successful 
    574574        if ( $headers['response'] != '200' ) { 
     
    580580            return new WP_Error( 'import_file_error', __('Remote file is incorrect size') ); 
    581581        } 
    582              
     582 
    583583        $max_size = $this->max_attachment_size(); 
    584584        if ( !empty($max_size) and filesize($upload['file']) > $max_size ) { 
     
    586586            return new WP_Error( 'import_file_error', sprintf(__('Remote file is too large, limit is %s', size_format($max_size))) ); 
    587587        } 
    588              
     588 
    589589        // keep track of the old and new urls so we can substitute them later 
    590590        $this->url_remap[$url] = $upload['url']; 
     
    592592        if ( $headers['x-final-location'] != $url ) 
    593593            $this->url_remap[$headers['x-final-location']] = $upload['url']; 
    594          
     594 
    595595        return $upload; 
    596          
     596 
    597597    } 
    598598 
     
    601601        return strlen($b) - strlen($a); 
    602602    } 
    603      
     603 
    604604    // update url references in post bodies to point to the new local files 
    605605    function backfill_attachment_urls() { 
    606          
     606 
    607607        // make sure we do the longest urls first, in case one is a substring of another 
    608608        uksort($this->url_remap, array(&$this, 'cmpr_strlen')); 
    609                  
     609 
    610610        global $wpdb; 
    611611        foreach ($this->url_remap as $from_url => $to_url) { 
     
    616616        } 
    617617    } 
    618      
     618 
    619619    // update the post_parent of orphans now that we know the local id's of all parents 
    620620    function backfill_parents() { 
    621621        global $wpdb; 
    622          
     622 
    623623        foreach ($this->orphans as $child_id => $parent_id) { 
    624624            $local_child_id = $this->post_ids_processed[$child_id]; 
     
    629629        } 
    630630    } 
    631      
     631 
    632632    function is_valid_meta_key($key) { 
    633633        // skip _wp_attached_file metadata since we'll regenerate it from scratch 
     
    641641        return apply_filters('import_allow_create_users', true); 
    642642    } 
    643      
     643 
    644644    // give the user the option of downloading and importing attached files 
    645645    function allow_fetch_attachments() { 
     
    651651        return apply_filters('import_attachment_size_limit', 0); 
    652652    } 
    653      
     653 
    654654    function import_start() { 
    655655        wp_defer_term_counting(true); 
     
    657657        do_action('import_start'); 
    658658    } 
    659      
     659 
    660660    function import_end() { 
    661661        do_action('import_end'); 
    662          
     662 
    663663        // clear the caches after backfilling 
    664664        foreach ($this->post_ids_processed as $post_id) 
    665665            clean_post_cache($post_id); 
    666          
     666 
    667667        wp_defer_term_counting(false); 
    668668        wp_defer_comment_counting(false); 
     
    677677        $this->import_file($file); 
    678678    } 
    679          
     679 
    680680    function import_file($file) { 
    681681        $this->file = $file; 
    682          
     682 
    683683        $this->import_start(); 
    684684        $this->get_authors_from_post(); 
     
    690690        $this->backfill_attachment_urls(); 
    691691        $this->import_end(); 
    692          
     692 
    693693        if ( is_wp_error( $result ) ) 
    694694            return $result; 
    695695    } 
    696      
     696 
    697697    function handle_upload() { 
    698698        $file = wp_import_handle_upload(); 
  • trunk/wp-admin/import/wp-cat2tag.php

    r6551 r6726  
    1 <?php  
     1<?php 
    22 
    33class WP_Categories_to_Tags { 
     
    2020        foreach ( $categories as $category ) { 
    2121            if ( !tag_exists($wpdb->escape($category->name)) ) 
    22                 $this->all_categories[] = $category;    
     22                $this->all_categories[] = $category; 
    2323        } 
    2424    } 
     
    5454        } 
    5555        checkflag = 'true'; 
    56         return '<?php _e('Uncheck All') ?>';  
     56        return '<?php _e('Uncheck All') ?>'; 
    5757    } else { 
    5858        for ( i = 0; i < field.length; i++ ) { 
     
    6161        } 
    6262        checkflag = 'false'; 
    63         return '<?php _e('Check All') ?>';  
     63        return '<?php _e('Check All') ?>'; 
    6464    } 
    6565} 
     
    7777        foreach ($this->all_categories as $category) { 
    7878            $category = sanitize_term( $category, 'category', 'display' ); 
    79          
     79 
    8080            if ((int) $category->parent == 0) { 
    8181                echo '<li><label><input type="checkbox" name="cats_to_convert[]" value="' . intval($category->term_id) . '" /> ' . $category->name . ' (' . $category->count . ')</label>'; 
     
    165165                    $posts = get_objects_in_term($category->term_id, 'category'); 
    166166                    foreach ( $posts as $post ) { 
    167                         if ( !$wpdb->get_var("SELECT object_id FROM $wpdb->term_relationships WHERE object_id = '$post' AND term_taxonomy_id = '$id'") )                        
     167                        if ( !$wpdb->get_var("SELECT object_id FROM $wpdb->term_relationships WHERE object_id = '$post' AND term_taxonomy_id = '$id'") ) 
    168168                            $wpdb->query("INSERT INTO $wpdb->term_relationships (object_id, term_taxonomy_id) VALUES ('$post', '$id')"); 
    169169                        clean_post_cache($post); 
  • trunk/wp-admin/includes/dashboard.php

    r6717 r6726  
    5959        array( 'widget_id' => 'dashboard_plugins' ) 
    6060    ); 
    61      
     61 
    6262 
    6363    // Primary feed (Dev Blog) Widget 
     
    9292        ); 
    9393    } 
    94     wp_register_sidebar_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_empty',  
     94    wp_register_sidebar_widget( 'dashboard_secondary', $widget_options['dashboard_secondary']['title'], 'wp_dashboard_empty', 
    9595        array( 'all_link' => $widget_options['dashboard_secondary']['link'], 'feed_link' => $widget_options['dashboard_secondary']['url'], 'width' => 'full' ) 
    9696    ); 
  • trunk/wp-admin/includes/export.php

    r6383 r6726  
    7575function wxr_site_url() { 
    7676    global $current_site; 
    77      
     77 
    7878    // mu: the base url 
    7979    if ( isset($current_site->domain) ) { 
  • trunk/wp-admin/includes/image.php

    r6579 r6726  
    2222 
    2323    $image = wp_load_image( $file ); 
    24      
     24 
    2525    if ( !is_resource( $image ) ) 
    2626        return $image; 
     
    4040        imagesavealpha( $thumbnail, true); 
    4141    } 
    42      
     42 
    4343    @ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $sourceImageWidth, $sourceImageHeight ); 
    4444 
    45     imagedestroy( $image ); // Free up memory  
     45    imagedestroy( $image ); // Free up memory 
    4646 
    4747    // If no filters change the filename, we'll do a default transformation. 
     
    6868    } 
    6969 
    70     imagedestroy( $thumbnail ); // Free up memory  
    71      
    72     // Set correct file permissions  
    73     $stat = stat( dirname( $thumbpath ));  
     70    imagedestroy( $thumbnail ); // Free up memory 
     71 
     72    // Set correct file permissions 
     73    $stat = stat( dirname( $thumbpath )); 
    7474    $perms = $stat['mode'] & 0000666; //same permissions as parent folder, strip off the executable bits 
    75     @ chmod( $thumbpath, $perms );  
     75    @ chmod( $thumbpath, $perms ); 
    7676 
    7777    return apply_filters( 'wp_create_thumbnail', $thumbpath ); 
     
    115115 
    116116    imagecopyresampled( $dst, $src, 0, 0, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h ); 
    117      
    118     imagedestroy( $src ); // Free up memory  
     117 
     118    imagedestroy( $src ); // Free up memory 
    119119 
    120120    if ( ! $dst_file ) 
     
    160160                $metadata['thumb'] = basename($thumb); 
    161161        } 
    162          
     162 
    163163        // fetch additional metadata from exif/iptc 
    164164        $image_meta = wp_read_image_metadata( $file ); 
  • trunk/wp-admin/includes/media.php

    r6659 r6726  
    1616    $image_align = @$values['image-url']; 
    1717    $post_id = $_GET['post_id']; 
    18      
     18 
    1919?> 
    2020<div id="media-upload-header"> 
     
    3434<!-- 
    3535 
    36 jQuery(document).ready(function(){  
     36jQuery(document).ready(function(){ 
    3737    var swfu = new SWFUpload({ 
    3838            upload_url : "<?php echo get_option('siteurl').'/wp-admin/async-upload.php'; ?>", 
     
    6060                cancelButtonId : "btnCancel2" 
    6161            }, 
    62              
     62 
    6363            debug: false, 
    64          
     64 
    6565        }); 
    6666 
     
    108108 
    109109function image_upload_handler() { 
    110      
     110 
    111111    if ( !current_user_can('upload_files') ) { 
    112112        return new wp_error( 'upload_not_allowed', __('You are not allowed to upload files.') ); 
     
    120120        // Add Image button was clicked 
    121121        check_admin_referer('inlineuploading'); 
    122      
     122 
    123123        // if the async flash uploader was used, the attachment has already been inserted and its ID is passed in post. 
    124124        // otherwise this is a regular form post and we still have to handle the upload and create the attachment. 
     
    135135            $id = image_upload_post(); 
    136136        } 
    137          
     137 
    138138        // if the input was invalid, redisplay the form with its current values 
    139139        if ( is_wp_error($id) ) 
     
    151151    if ( empty($thumb_url) ) 
    152152        $thumb_url = wp_mime_type_icon($id); 
    153          
     153 
    154154    if ($thumb_url) { 
    155155        $out = '<p><input type="hidden" name="attachment_id" id="attachment_id" value="'.intval($id).'" />' 
     
    161161            . basename(wp_get_attachment_url($id)).'</p>'; 
    162162    } 
    163      
     163 
    164164    $post = get_post($id); 
    165165    $title = addslashes($post->post_title); 
    166166    $alt = addslashes($post->post_content); 
    167      
     167 
    168168    // populate the input fields with post data (which in turn comes from exif/iptc) 
    169169    $out .= <<<EOF 
     
    175175jQuery('#image-add').attr('disabled', false); 
    176176--> 
    177 </script>   
     177</script> 
    178178EOF; 
    179179 
     
    185185 
    186186function image_send_to_editor($id, $alt, $title, $align, $url='') { 
    187      
     187 
    188188    $img_src = wp_get_attachment_url($id); 
    189189    $meta = wp_get_attachment_metadata($id); 
    190      
     190 
    191191    $hwstring = ''; 
    192192    if ( isset($meta['width'], $meta['height']) ) 
     
    208208top.tb_remove(); 
    209209--> 
    210 </script>   
     210</script> 
    211211    <?php 
    212212} 
     
    218218    if ( empty($_POST['image-alt']) ) 
    219219        return new wp_error( 'image_alt_required', __('Please enter an &lt;alt&gt; description') ); 
    220      
     220 
    221221    $overrides = array('test_form'=>false); 
    222222    $file = wp_handle_upload($_FILES['image-file'], $overrides); 
     
    224224    if ( isset($file['error']) ) 
    225225        return new wp_error( 'upload_error', $file['error'] ); 
    226          
     226 
    227227    $url = $file['url']; 
    228228    $type = $file['type']; 
    229229    $file = $file['file']; 
    230      
     230 
    231231    $post_title = trim($_POST['image-title']); 
    232232    $post_content = trim($_POST['image-alt']); 
    233233    $post_parent = intval($_POST['parent_post_id']); 
    234          
     234 
    235235    // Construct the attachment array 
    236236    $attachment = array( 
     
    248248        wp_update_attachment_metadata( $id, wp_generate_attachment_metadata( $id, $file ) ); 
    249249 
    250     return $id;         
     250    return $id; 
    251251} 
    252252 
  • trunk/wp-admin/includes/post.php

    r6712 r6726  
    543543    } 
    544544    if (!is_null($name)) { 
    545         $post->post_name = sanitize_title($name, $post->ID);  
     545        $post->post_name = sanitize_title($name, $post->ID); 
    546546    } 
    547547    $permalink = get_permalink($post, true); 
     
    566566    $display_link = str_replace('%postname%', $post_name_html, $permalink); 
    567567    return $display_link; 
    568 }  
     568} 
    569569 
    570570?> 
  • trunk/wp-admin/includes/template.php

    r6713 r6726  
    240240        $count = number_format_i18n( $tag->count ); 
    241241        $count = ( $count > 0 ) ? "<a href='edit.php?tag=$tag->slug'>$count</a>" : $count; 
    242          
     242 
    243243        $out = ''; 
    244244        $out .= '<tr id="tag-' . $tag->term_id . '"' . $class . '>'; 
     
    247247        $out .= '<td>' . apply_filters( 'term_name', $tag->name ) . '</td>'; 
    248248 
    249         $out .= "<td>$count</td>";      
     249        $out .= "<td>$count</td>";