diff --git a/wp-admin/images/loading-publish.gif b/wp-admin/images/loading-publish.gif
index fc1baf5551..4282004fb7 100644
Binary files a/wp-admin/images/loading-publish.gif and b/wp-admin/images/loading-publish.gif differ
diff --git a/wp-admin/press-this.php b/wp-admin/press-this.php
index 466317735b..681ffb491a 100644
--- a/wp-admin/press-this.php
+++ b/wp-admin/press-this.php
@@ -213,6 +213,7 @@ switch ($_REQUEST['ajax']) {
if ( empty($matches[0]) ) return '';
$sources = array();
+
foreach ($matches[3] as $src) {
// if no http in url
if(strpos($src, 'http') === false)
@@ -223,6 +224,7 @@ switch ($_REQUEST['ajax']) {
$src = 'http://'.str_replace('//','/', $host['host'].'/'.dirname($host['path']).'/'.$src);
$sources[] = clean_url($src);
}
+
return "'" . implode("','", $sources) . "'";
}
@@ -257,17 +259,18 @@ switch ($_REQUEST['ajax']) {
}).responseText
);
if(my_src.length == 0) {
-
strtoappend = '';
}
}
-
for (i = 0; i < my_src.length; i++) {
img = new Image();
img.src = my_src[i];
img_attr = 'id="img' + i + '"';
skip = false;
+
+ maybeappend = '';
+
if (img.width && img.height) {
if (img.width >= 30 && img.height >= 30) {
aspect = img.width / img.height;
@@ -281,18 +284,20 @@ switch ($_REQUEST['ajax']) {
h = parseInt(img.height * scale);
}
img_attr += ' style="width: ' + w + 'px; height: ' + h + 'px;"';
- strtoappend += '
';
+ strtoappend += maybeappend;
}
+ } else {
+ strtoappend += maybeappend;
}
}
-
+
function pick(img, desc) {
if (img) {
if('object' == typeof jQuery('.photolist input') && jQuery('.photolist input').length != 0) length = jQuery('.photolist input').length;
if(length == 0) length = 1;
jQuery('.photolist').append('');
jQuery('.photolist').append('');
- insert_editor("\n\n" + '
' + tinymce.DOM.decode(text) + '
'); + if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) { + tinyMCE.execCommand('mceInsertContent', false, '' + tinymce.DOM.decode(text) + '
', {format : 'raw'}); + } else { + insert_plain_editor(text); + } } function append_editor(text) { - if ( '' != text && tinyMCE.activeEditor ) tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '' + text + '
'); - tinyMCE.execCommand('mceCleanup'); + if ( '' != text && tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden()) { + tinyMCE.execCommand('mceSetContent', false, tinyMCE.activeEditor.getContent({format : 'raw'}) + '' + text + '
'); + tinyMCE.execCommand('mceCleanup'); + } else { + insert_plain_editor(text); + } } function show(tab_name) { - + jQuery('#extra_fields').html(''); + jQuery('#extra_fields').show(); switch(tab_name) { case 'video' : - jQuery('#extra_fields').html(''); - jQuery('#extra_fields').show(); jQuery('#extra_fields').load('', { ajax: 'video', s: ''}, function() { jQuery('#embed-code').prepend(''); - }); return false; break; case 'photo' : - jQuery('#extra_fields').html(''); - jQuery('#extra_fields').show(); - jQuery('#extra_fields').before('