WordPress.org

Make WordPress Core

Changeset 13600


Ignore:
Timestamp:
03/06/10 08:00:42 (5 years ago)
Author:
dd32
Message:

Display an Attachment Icon if an Attachment thumbnail is not available. Fixes display of Upload edit fields. Fixes #12328

File:
1 edited

Legend:

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

    r13528 r13600  
    11491149    global $redir_tab; 
    11501150 
    1151     if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id ) ) 
     1151    if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) ) 
    11521152        $thumb_url = $thumb_url[0]; 
    11531153    else 
    1154         return false; 
     1154        $thumb_url = false; 
    11551155 
    11561156    $default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true ); 
     
    14751475    <?php _e( 'Choose files to upload' ); ?> 
    14761476    <div id="flash-browse-button"></div> 
    1477     <span><input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span> 
     1477    <span><input id="cancel-upload" disabled="disabled" onClick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span> 
    14781478    </div> 
    14791479<?php do_action('post-flash-upload-ui'); ?> 
     
    20352035                <input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' /> 
    20362036                <label for="align-none" class="align image-align-none-label">' . __('None') . '</label> 
    2037                 <input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' /> 
     2037                <input name="align" id="align-left" value="left" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' /> 
    20382038                <label for="align-left" class="align image-align-left-label">' . __('Left') . '</label> 
    2039                 <input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' /> 
     2039                <input name="align" id="align-center" value="center" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' /> 
    20402040                <label for="align-center" class="align image-align-center-label">' . __('Center') . '</label> 
    2041                 <input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' /> 
     2041                <input name="align" id="align-right" value="right" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' /> 
    20422042                <label for="align-right" class="align image-align-right-label">' . __('Right') . '</label> 
    20432043            </td> 
     
    20502050            <td class="field"><input id="url" name="url" value="" type="text" /><br /> 
    20512051 
    2052             <button type="button" class="button" value="" onclick="document.forms[0].url.value=null">' . __('None') . '</button> 
    2053             <button type="button" class="button" value="" onclick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button> 
     2052            <button type="button" class="button" value="" onClick="document.forms[0].url.value=null">' . __('None') . '</button> 
     2053            <button type="button" class="button" value="" onClick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button> 
    20542054            <p class="help">' . __('Enter a link URL or click above for presets.') . '</p></td> 
    20552055        </tr> 
     
    20582058            <td></td> 
    20592059            <td> 
    2060                 <input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" /> 
     2060                <input type="button" class="button" id="go_button" style="color:#bbb;" onClick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" /> 
    20612061            </td> 
    20622062        </tr> 
Note: See TracChangeset for help on using the changeset viewer.