diff --git a/wp-admin/css/colors-fresh.css b/wp-admin/css/colors-fresh.css index 7ee36cf41..fc8f70664 100644 --- a/wp-admin/css/colors-fresh.css +++ b/wp-admin/css/colors-fresh.css @@ -963,12 +963,6 @@ abbr.required, border-top-left-radius: 4px; } -.wp-admin .clearlooks2 .mceFocus .mceTop .mceCenter { - background: #444444; - border-bottom: 1px solid #999; - border-top: 1px solid #999; -} - .wp-admin .clearlooks2 .mceFocus .mceTop .mceRight { background: #444444; border-right: 1px solid #999; @@ -1012,7 +1006,7 @@ abbr.required, } .wp-admin .clearlooks2 .mceFocus .mceTop span { - color: #fff; + color: #e5e5e5; } /* end TinyMCE */ diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index 94fc0c9b6..e0a82dd95 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -43,7 +43,7 @@ th { } .media-upload-form label.form-help, td.help { - font-family: "Lucida Grande", Verdana, Arial, "Bitstream Vera Sans", sans-serif; + font-family: "Lucida Grande", "Bitstream Vera Sans", Verdana, Arial, sans-serif; font-style: italic; font-weight: normal; } @@ -284,6 +284,7 @@ abbr.required { #media-upload .describe th.label { padding-top: .5em; text-align: left; + min-width: 120px; } #media-upload tr.align td.field { @@ -354,3 +355,70 @@ abbr.required { .sorthelper { z-index: -1; } + +#gallery-settings th.label { + width: 160px; +} + +#gallery-settings #basic th.label { + padding: 5px 5px 5px 0; +} + +#gallery-settings .title { + clear: both; + padding: 0 0 3px; + border-bottom-style: solid; + border-bottom-width: 1px; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 1.6em; + border-bottom-color: #DADADA; + color: #5A5A5A; +} + +.media-blank h3 { + color: #5A5A5A; + font-family: Georgia,"Times New Roman",Times,serif; + font-size: 1.6em; + font-weight: normal; +} + +#gallery-settings .describe td { + vertical-align: middle; + height: 3.5em; +} + +#gallery-settings .describe th.label { + padding-top: .5em; + text-align: left; +} + +#gallery-settings .describe { + padding: 5px; + width: 615px; + clear: both; + cursor: default; +} + +#gallery-settings .describe select { + width: 15em; + border: 1px solid #dfdfdf; +} + +#gallery-settings label, +#gallery-settings legend { + font-size: 13px; + color: #464646; + margin-right: 15px; +} + +#gallery-settings .align .field label { + margin: 0 1.5em 0 0; +} + +#gallery-settings p.ml-submit { + border-top: 1px solid #dfdfdf; +} + +#gallery-settings select#columns { + width: 6em; +} diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index ca5155925..7313c3458 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -15,9 +15,10 @@ */ function media_upload_tabs() { $_default_tabs = array( - 'type' => __('Choose File'), // handler action suffix => tab text + 'type' => __('From Computer'), // handler action suffix => tab text + 'type_url' => __('From URL'), 'gallery' => __('Gallery'), - 'library' => __('Media Library'), + 'library' => __('Media Library') ); return apply_filters('media_upload_tabs', $_default_tabs); @@ -329,13 +330,13 @@ function media_buttons() { $uploading_iframe_ID = (int) (0 == $post_ID ? $temp_ID : $post_ID); $context = apply_filters('media_buttons_context', __('Upload %s')); $media_upload_iframe_src = "media-upload.php?post_id=$uploading_iframe_ID"; - $media_title = __('Upload Media'); + $media_title = __('Add Media'); $image_upload_iframe_src = apply_filters('image_upload_iframe_src', "$media_upload_iframe_src&type=image"); - $image_title = __('Upload an Image'); + $image_title = __('Add an Image'); $video_upload_iframe_src = apply_filters('video_upload_iframe_src', "$media_upload_iframe_src&type=video"); - $video_title = __('Upload Video'); + $video_title = __('Add Video'); $audio_upload_iframe_src = apply_filters('audio_upload_iframe_src', "$media_upload_iframe_src&type=audio"); - $audio_title = __('Upload Audio'); + $audio_title = __('Add Audio'); $out = <<$image_title @@ -385,8 +386,16 @@ function media_upload_form_handler() { wp_set_object_terms($attachment_id, array_map('trim', preg_split('/,+/', $attachment[$t])), $t, false); } - if ( isset($_POST['insert-gallery']) ) - return media_send_to_editor('[gallery]'); + if ( isset($_POST['insert-gallery']) || isset($_POST['update-gallery']) ) { ?> + +
-

+ +
+

+
+ - +
+'.wp_specialchars($id->get_error_message()).''; + exit; + } +} - +/** + * {@internal Missing Short Description}} + * + * @since unknown + * + * @param unknown_type $type + * @param unknown_type $errors + * @param unknown_type $id + */ +function media_upload_type_url_form($type = 'file', $errors = null, $id = null) { + media_upload_header(); + + $post_id = intval($_REQUEST['post_id']); + + $form_action_url = admin_url("media-upload.php?type=$type&tab=type&post_id=$post_id"); + $form_action_url = apply_filters('media_upload_form_url', $form_action_url, $type); + + $callback = "type_url_form_$type"; +?> + + + + + +
-

-

+

- - - - - - - - - - - -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - -
- - - -
- - - - - - - -
- - - -
- - - -

{#gallery.imgwidthhelp}

-
- -
- - -
-
- -
- - - diff --git a/wp-includes/js/tinymce/plugins/wpgallery/js/gallery.js b/wp-includes/js/tinymce/plugins/wpgallery/js/gallery.js deleted file mode 100644 index 0b8daf480..000000000 --- a/wp-includes/js/tinymce/plugins/wpgallery/js/gallery.js +++ /dev/null @@ -1,165 +0,0 @@ - -var tinymce = null, tinyMCEPopup, tinyMCE; - -tinyMCEPopup = { - init: function() { - var t = this, w, ti, li, q, i, it; - - li = ('' + document.location.search).replace(/^\?/, '').split('&'); - q = {}; - for (i=0; i' ); - } - }, - - I : function(e) { - return document.getElementById(e); - }, - - init : function() { - var ed = tinyMCEPopup.editor, h; - - h = document.body.innerHTML; - - // Replace a=x with a="x" in IE - if (tinymce.isIE) - h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"') - - document.body.innerHTML = ed.translate(h); - window.setTimeout( function(){wpgallery.setup();}, 100 ); - }, - - setup : function() { - var t = this, a, f = document.forms[0], ed = tinyMCEPopup.editor, dom = tinyMCEPopup.dom; - document.dir = tinyMCEPopup.editor.getParam('directionality',''); - - tinyMCEPopup.restoreSelection(); - el = ed.selection.getNode(); - if (el.nodeName != 'IMG') return; - - a = ed.dom.getAttrib(el, 'title'); - a = ed.dom.decode(a); - - if ( a ) { - var columns = a.match(/columns=['"]([0-9]+)['"]/), link = a.match(/link=['"]([^'"]+)['"]/i); - var imgwidth = a.match(/imgwidth=['"]([0-9]+)['"]/), order = a.match(/order=['"]([^'"]+)['"]/i); - var orderby = a.match(/orderby=['"]([^'"]+)['"]/i), all = ''; - - if ( link && link[1] ) t.I('linkto-file').checked = "checked"; - if ( order && order[1] ) t.I('order-desc').checked = "checked"; - if ( columns && columns[1] ) t.I('columns').value = ''+columns[1]; - if ( orderby && orderby[1] ) t.I('orderby').value = orderby[1]; - if ( imgwidth && imgwidth[1] ) t.I('imgwidth').value = imgwidth[1]; - } - - document.body.style.display = ''; - }, - - update : function() { - var t = this, ed = tinyMCEPopup.editor, el, all; - - tinyMCEPopup.restoreSelection(); - el = ed.selection.getNode(); - - if (el.nodeName != 'IMG') return; - - all = ed.dom.decode(ed.dom.getAttrib(el, 'title')); - all = all.substr(0, all.lastIndexOf(']')); - all = all.replace(/\s*(order|link|columns|orderby|imgwidth)=['"]([^'"]+)['"]/gi, ''); - - if ( t.I('linkto-file').checked ) - all += ' link="file"'; - - if ( t.I('order-desc').checked ) - all += ' order="DESC"'; - - if ( t.I('columns').value != 3 ) - all += ' columns="'+t.I('columns').value+'"'; - - if ( t.I('orderby').value != 'menu_order' ) - all += ' orderby="'+t.I('orderby').value+'"'; - - if ( t.I('imgwidth').value ) - all += ' imgwidth="'+t.I('imgwidth').value+'"'; - - all += ']'; - - ed.dom.setAttrib(el, 'title', all); - tinyMCEPopup.close(); - } -}; - -window.onload = function(){wpgallery.init();} -wpgallery.preInit(); diff --git a/wp-includes/media.php b/wp-includes/media.php index d0dab99f6..7c2fb43da 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -522,16 +522,15 @@ function wp_get_attachment_image_src($attachment_id, $size='thumbnail', $icon = * @param int $attachment_id Image attachment ID. * @param string $size Optional, default is 'thumbnail'. * @param bool $icon Optional, default is false. Whether it is an icon. - * @param int $imgwidth Override image width. * @return string HTML img element or empty string on failure. */ -function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false, $imgwidth = false) { +function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = false) { $html = ''; $image = wp_get_attachment_image_src($attachment_id, $size, $icon); if ( $image ) { list($src, $width, $height) = $image; - $hwstring = $imgwidth ? image_hwstring($imgwidth, '') : image_hwstring($width, $height); + $hwstring = image_hwstring($width, $height); if ( is_array($size) ) $size = join('x', $size); $html = ''; @@ -618,8 +617,7 @@ function gallery_shortcode($attr) { 'icontag' => 'dt', 'captiontag' => 'dd', 'columns' => 3, - 'size' => 'thumbnail', - 'imgwidth' => '' + 'size' => 'thumbnail' ), $attr)); $id = intval($id); @@ -639,7 +637,6 @@ function gallery_shortcode($attr) { $captiontag = tag_escape($captiontag); $columns = intval($columns); $itemwidth = $columns > 0 ? floor(100/$columns) : 100; - $imgwidth = isset($imgwidth) && (int) $imgwidth ? $imgwidth : false; $output = apply_filters('gallery_style', "