Make WordPress Core


Ignore:
Timestamp:
12/09/2008 06:03:31 PM (18 years ago)
Author:
ryan
Message:

Strip trailing whitespace

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/media.php

    r10124 r10150  
    103103
    104104        $htmlalt = ( empty($alt) ) ? $title : $alt;
    105  
     105
    106106        $html = get_image_tag($id, $htmlalt, $title, $align, $size);
    107107
    … …  
    474474                return media_upload_gallery();
    475475        }
    476        
     476
    477477        if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
    478478                return wp_iframe( 'media_upload_type_url_form', 'image', $errors, $id );
    … …  
    502502                        $file_array['tmp_name'] = '';
    503503                }
    504                
     504
    505505                $id = media_handle_sideload($file_array, $post_id, $desc);
    506506                $src = $id;
    507                
     507
    508508                if ( is_wp_error($id) ) {
    509509                        @unlink($file_array['tmp_name']);
    … …  
    568568        if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
    569569                return wp_iframe( 'media_upload_type_url_form', 'audio', $errors, $id );
    570        
     570
    571571        return wp_iframe( 'media_upload_type_form', 'audio', $errors, $id );
    572572}
    … …  
    621621        if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
    622622                return wp_iframe( 'media_upload_type_url_form', 'video', $errors, $id );
    623        
     623
    624624        return wp_iframe( 'media_upload_type_form', 'video', $errors, $id );
    625625}
    … …  
    674674        if ( isset($_GET['tab']) && $_GET['tab'] == 'type_url' )
    675675                return wp_iframe( 'media_upload_type_url_form', 'file', $errors, $id );
    676        
     676
    677677        return wp_iframe( 'media_upload_type_form', 'file', $errors, $id );
    678678}
    … …  
    732732 */
    733733function image_align_input_fields($post, $checked='') {
    734        
     734
    735735        $alignments = array('none' => 'None', 'left' => 'Left', 'center' => 'Center', 'right' => 'Right');
    736736        if ( !array_key_exists($checked, $alignments) )
    737737                $checked = 'none';
    738        
     738
    739739        $out = array();
    740740        foreach ($alignments as $name => $label) {
    741        
     741
    742742                $out[] = "<input type='radio' name='attachments[{$post->ID}][align]' id='image-align-{$name}-{$post->ID}' value='$name'".
    743                         ( $checked == $name ? " checked='checked'" : "" ) . 
     743                        ( $checked == $name ? " checked='checked'" : "" ) .
    744744                        " /><label for='image-align-{$name}-{$post->ID}' class='align image-align-{$name}-label'>" . __($label) . "</label>";
    745745        }
    … …  
    757757 */
    758758function image_size_input_fields($post, $checked='') {
    759                
     759
    760760                // get a list of the actual pixel dimensions of each possible intermediate version of this image
    761                 $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));               
     761                $size_names = array('thumbnail' => __('Thumbnail'), 'medium' => __('Medium'), 'large' => __('Large'), 'full' => __('Full size'));
    762762
    763763                foreach ( $size_names as $size => $name) {
    … …  
    773773                        if ( !$checked && $enabled && 'thumbnail' != $size )
    774774                                $checked = $size;
    775                        
     775
    776776                        $html = "<div class='image-size-item'><input type='radio' ".( $enabled ? '' : "disabled='disabled'")."name='attachments[$post->ID][image-size]' id='{$css_id}' value='{$size}'".( $checked == $size ? " checked='checked'" : '') ." />";
    777                        
     777
    778778                        $html .= "<label for='{$css_id}'>" . __($name). "</label>";
    779779                        // only show the dimensions if that choice is available
    780780                        if ( $enabled )
    781781                                $html .= " <label for='{$css_id}' class='help'>" . sprintf( __("(%d&nbsp;&times;&nbsp;%d)"), $downsize[1], $downsize[2] ). "</label>";
    782                                
     782
    783783                        $html .= '</div>';
    784                
     784
    785785                        $out[] = $html;
    786786                }
    787                
     787
    788788                return array(
    789789                        'label' => __('Size'),
    … …  
    812812        elseif ( $url_type == 'post' )
    813813                $url = $link;
    814        
     814
    815815        return "<input type='text' class='urlfield' name='attachments[$post->ID][url]' value='" . attribute_escape($url) . "' /><br />
    816816                                <button type='button' class='button urlnone' title=''>" . __('None') . "</button>
    … …  
    843843                        'html'  => image_align_input_fields($post, get_option('image_default_align')),
    844844                );
    845                
     845
    846846                $form_fields['image-size'] = image_size_input_fields($post, get_option('image_default_size'));
    847847        }
    … …  
    12881288                        swfupload_pre_load_handler: swfuploadPreLoad,
    12891289                        swfupload_load_failed_handler: swfuploadLoadFailed,
    1290                         custom_settings : { 
     1290                        custom_settings : {
    12911291                                degraded_element_id : "html-upload-ui", // id of the element displayed when swfupload is unavailable
    12921292                                swfupload_element_id : "flash-upload-ui" // id of the element displayed when swfupload is available
    … …  
    13001300<div id="flash-upload-ui">
    13011301<?php do_action('pre-flash-upload-ui'); ?>
    1302        
     1302
    13031303        <div><?php _e( 'Choose files to upload' ); ?> <div id="flash-browse-button"></div></div>
    13041304<?php do_action('post-flash-upload-ui'); ?>
    … …  
    13621362</script>
    13631363<div id="media-items">
    1364 <?php 
     1364<?php
    13651365if ( $id ) {
    13661366        if ( !is_wp_error($id) ) {
    … …  
    17941794        if ( empty($default_align) )
    17951795                $default_align = 'none';
    1796                
     1796
    17971797        return '
    17981798        <table class="describe"><tbody>
Note: See TracChangeset for help on using the changeset viewer.