Display an Attachment Icon if an Attachment thumbnail is not available. Fixes display of Upload edit fields. Fixes #12328
git-svn-id: http://svn.automattic.com/wordpress/trunk@13600 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
715188a970
commit
9e31757e40
|
@ -1148,10 +1148,10 @@ function get_media_items( $post_id, $errors ) {
|
||||||
function get_media_item( $attachment_id, $args = null ) {
|
function get_media_item( $attachment_id, $args = null ) {
|
||||||
global $redir_tab;
|
global $redir_tab;
|
||||||
|
|
||||||
if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id ) )
|
if ( ( $attachment_id = intval( $attachment_id ) ) && $thumb_url = wp_get_attachment_image_src( $attachment_id, 'thumbnail', true ) )
|
||||||
$thumb_url = $thumb_url[0];
|
$thumb_url = $thumb_url[0];
|
||||||
else
|
else
|
||||||
return false;
|
$thumb_url = false;
|
||||||
|
|
||||||
$default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true );
|
$default_args = array( 'errors' => null, 'send' => true, 'delete' => true, 'toggle' => true, 'show_title' => true );
|
||||||
$args = wp_parse_args( $args, $default_args );
|
$args = wp_parse_args( $args, $default_args );
|
||||||
|
@ -1474,7 +1474,7 @@ SWFUpload.onload = function() {
|
||||||
<div>
|
<div>
|
||||||
<?php _e( 'Choose files to upload' ); ?>
|
<?php _e( 'Choose files to upload' ); ?>
|
||||||
<div id="flash-browse-button"></div>
|
<div id="flash-browse-button"></div>
|
||||||
<span><input id="cancel-upload" disabled="disabled" onclick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span>
|
<span><input id="cancel-upload" disabled="disabled" onClick="cancelUpload()" type="button" value="<?php esc_attr_e('Cancel Upload'); ?>" class="button" /></span>
|
||||||
</div>
|
</div>
|
||||||
<?php do_action('post-flash-upload-ui'); ?>
|
<?php do_action('post-flash-upload-ui'); ?>
|
||||||
<p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
|
<p class="howto"><?php _e('After a file has been uploaded, you can add titles and descriptions.'); ?></p>
|
||||||
|
@ -2034,11 +2034,11 @@ function type_url_form_image() {
|
||||||
<td class="field">
|
<td class="field">
|
||||||
<input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
|
<input name="align" id="align-none" value="none" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'none' ? ' checked="checked"' : '').' />
|
||||||
<label for="align-none" class="align image-align-none-label">' . __('None') . '</label>
|
<label for="align-none" class="align image-align-none-label">' . __('None') . '</label>
|
||||||
<input name="align" id="align-left" value="left" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
|
<input name="align" id="align-left" value="left" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'left' ? ' checked="checked"' : '').' />
|
||||||
<label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>
|
<label for="align-left" class="align image-align-left-label">' . __('Left') . '</label>
|
||||||
<input name="align" id="align-center" value="center" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
|
<input name="align" id="align-center" value="center" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'center' ? ' checked="checked"' : '').' />
|
||||||
<label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>
|
<label for="align-center" class="align image-align-center-label">' . __('Center') . '</label>
|
||||||
<input name="align" id="align-right" value="right" onclick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
|
<input name="align" id="align-right" value="right" onClick="addExtImage.align=\'align\'+this.value" type="radio"' . ($default_align == 'right' ? ' checked="checked"' : '').' />
|
||||||
<label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>
|
<label for="align-right" class="align image-align-right-label">' . __('Right') . '</label>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -2049,15 +2049,15 @@ function type_url_form_image() {
|
||||||
</th>
|
</th>
|
||||||
<td class="field"><input id="url" name="url" value="" type="text" /><br />
|
<td class="field"><input id="url" name="url" value="" type="text" /><br />
|
||||||
|
|
||||||
<button type="button" class="button" value="" onclick="document.forms[0].url.value=null">' . __('None') . '</button>
|
<button type="button" class="button" value="" onClick="document.forms[0].url.value=null">' . __('None') . '</button>
|
||||||
<button type="button" class="button" value="" onclick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button>
|
<button type="button" class="button" value="" onClick="document.forms[0].url.value=document.forms[0].src.value">' . __('Link to image') . '</button>
|
||||||
<p class="help">' . __('Enter a link URL or click above for presets.') . '</p></td>
|
<p class="help">' . __('Enter a link URL or click above for presets.') . '</p></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<input type="button" class="button" id="go_button" style="color:#bbb;" onclick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
|
<input type="button" class="button" id="go_button" style="color:#bbb;" onClick="addExtImage.insert()" value="' . esc_attr__('Insert into Post') . '" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
|
Loading…
Reference in New Issue