diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index 62860a7663..fb86e84bbe 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -109,11 +109,17 @@ form.media-upload-form { background: url(../images/align-right.png) no-repeat center left; } -.media-upload-form fieldset#image-size label { +#flash-upload-ui, .insert-gallery { + display: none; +} + +tr.image-size label { display: inline; margin: 0 1em 0 0; } - +tr.image-size td.field { + text-align: center; +} .pinkynail { max-width: 40px; max-height: 40px; @@ -187,11 +193,11 @@ span.filename { .describe input[type="text"], .describe textarea { width: 460px; } -.describe a.delete { +a.delete { display: block; text-align: center; - line-height: 24px; width: 100%; + color: #246; } .describe-toggle-on, .describe-toggle-off { line-height: 36px; diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index b8ae190bb7..ca3ab38873 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -46,16 +46,17 @@ foreach($posts_columns as $column_name=>$column_display_name) { case 'media': ?> -
'
- . ' '
- . basename(wp_get_attachment_url($id)).'
' - . basename(wp_get_attachment_url($id)).'
'; - } - - $post = get_post($id); - $title = addslashes($post->post_title); - $alt = addslashes($post->post_content); - - // populate the input fields with post data (which in turn comes from exif/iptc) - $out .= <<
-
-
-
-
-
-
-EOF;
- echo $out;
+ echo "" . __('Add media'). '';
}
add_action( 'media_buttons', 'media_buttons' );
@@ -522,11 +279,12 @@ function get_attachment_taxonomies($attachment) {
function image_attachment_fields_to_edit($form_fields, $post) {
if ( substr($post->post_mime_type, 0, 5) == 'image' ) {
$form_fields['post_title']['required'] = true;
- $form_fields['post_excerpt']['label'] = __('Alternate Text');
- $form_fields['post_content']['label'] = __('Description');
+ $form_fields['post_excerpt']['label'] = __('Description');
+ $form_fields['post_excerpt']['helps'][] = __('Alternate text, e.g. "The Mona Lisa"');
- if ( strlen(trim($post->post_excerpt)) == 0 )
- $form_fields['post_excerpt']['helps'][] = __('Alternate Text helps people who can not see the image.');
+ $form_fields['post_content']['label'] = __('Long Description');
+
+ $thumb = wp_get_attachment_thumb_url();
$form_fields['_send']['url'] = array(
'label' => __('Link URL'),
@@ -547,6 +305,17 @@ function image_attachment_fields_to_edit($form_fields, $post) {
\n",
);
+ $form_fields['_send']['image-size'] = array(
+ 'label' => __('Size'),
+ 'input' => 'html',
+ 'html' => "
+ " . ( $thumb ? "
+
+ " : '' ) . "
+
+
+ ",
+ );
}
return $form_fields;
}
@@ -581,7 +350,12 @@ function image_media_send_to_editor($html, $attachment_id, $attachment) {
else
$align = 'none';
- return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel);
+ if ( !empty($attachment['image-size']) )
+ $size = $attachment['image-size'];
+ else
+ $size = 'medium';
+
+ return get_image_send_to_editor($attachment_id, $attachment['post_excerpt'], $attachment['post_title'], $align, $url, $rel, $size);
}
return $html;
@@ -603,11 +377,11 @@ function get_attachment_fields_to_edit($post, $errors = null) {
'value' => $edit_post->post_title,
),
'post_excerpt' => array(
- 'label' => __('Excerpt'),
+ 'label' => __('Description'),
'value' => $edit_post->post_excerpt,
),
'post_content' => array(
- 'label' => __('Description'),
+ 'label' => __('Long description'),
'value' => $edit_post->post_content,
'input' => 'textarea',
'helps' => array(__('If filled, the default link URL will be the attachment permalink.')),
@@ -637,25 +411,21 @@ function get_attachment_fields_to_edit($post, $errors = null) {
// Merge default fields with their errors, so any key passed with the error (e.g. 'error', 'helps', 'value') will replace the default
// The recursive merge is easily traversed with array casting: foreach( (array) $things as $thing )
$form_fields = array_merge_recursive($form_fields, (array) $errors);
-
+
$form_fields = apply_filters('attachment_fields_to_edit', $form_fields, $post);
return $form_fields;
}
function get_multimedia_item( $attachment_id, $errors = null, $send = true ) {
- $thumb_url = wp_get_attachment_thumb_url( $attachment_id );
- if ( empty($thumb_url) )
- $thumb_url = wp_mime_type_icon( $attachment_id );
- if ( empty($thumb_url) && ( $post =& get_post( $attachment_id ) ) && substr($post->post_mime_type, 0, 5) == 'image' )
- $thumb_url = wp_get_attachment_url( $attachment_id );
+ $thumb_url = array_shift(get_attachment_icon_src( $attachment_id ));
$title_label = __('Title');
$description_label = __('Description');
$tags_label = __('Tags');
- $toggle_on = __('Describe');
- $toggle_off = __('Describe «');
+ $toggle_on = __('Show');
+ $toggle_off = __('Hide');
$post = get_post($attachment_id);
@@ -697,12 +467,12 @@ function get_multimedia_item( $attachment_id, $errors = null, $send = true ) {
$send = "";
if ( empty($form_fields['save']) && empty($form_fields['_send']) ) {
- $form_fields['save'] = array('tr' => "\t\t