From 32daaee6314bc7e0753421b1e48e06594935a5d6 Mon Sep 17 00:00:00 2001 From: matt Date: Thu, 17 Nov 2005 03:19:19 +0000 Subject: [PATCH] Some changes and tweaks to how the inline image uploading works. git-svn-id: http://svn.automattic.com/wordpress/trunk@3126 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 2 + wp-admin/edit-page-form.php | 2 + wp-admin/inline-uploading.php | 239 +++++++++++++++++--------------- 3 files changed, 133 insertions(+), 110 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index e6b0b4041b..37198edfa7 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -215,6 +215,8 @@ else get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$uploading_iframe_ID'") ) + $uploading_iframe_src = "inline-uploading.php?action=upload&post=$uploading_iframe_ID"; $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); if ( false != $uploading_iframe_src ) echo ''; diff --git a/wp-admin/edit-page-form.php b/wp-admin/edit-page-form.php index 803884b993..cf9d584bae 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -150,6 +150,8 @@ edCanvas = document.getElementById('content'); get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = '$uploading_iframe_ID'") ) + $uploading_iframe_src = "inline-uploading.php?action=upload&post=$uploading_iframe_ID"; $uploading_iframe_src = apply_filters('uploading_iframe_src', $uploading_iframe_src); if ( false != $uploading_iframe_src ) echo ''; diff --git a/wp-admin/inline-uploading.php b/wp-admin/inline-uploading.php index cc3fcc69d0..ea37da78a7 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -117,7 +117,7 @@ if ( $start < 0 ) $start = 0; if ( '' == $sort ) - $sort = "ID"; + $sort = "post_date_gmt DESC"; $images = $wpdb->get_results("SELECT ID, post_date, post_title, guid FROM $wpdb->posts WHERE post_status = 'attachment' AND left(post_mime_type, 5) = 'image' $and_post ORDER BY $sort LIMIT $start, $double", ARRAY_A); @@ -142,12 +142,13 @@ $images_style = ''; $images_script = ''; if ( count($images) > 0 ) { $images = array_slice( $images, 0, $num ); - $__delete = __('DELETE'); - $__attachment_on = __('ATTACHMENT ON'); - $__thumbnail_on = __('THUMBNAIL ON'); - $__thumbnail_off = __('THUMBNAIL OFF'); - $__no_thumbnail = __('THUMBNAIL'); - $__close = __('CLOSE'); + $__delete = __('Delete'); + $__attachment_on = __('Link to Page'); + $__attachment_off = __('Link to Image'); + $__thumbnail_on = __('Use Thumbnail'); + $__thumbnail_off = __('Use Full Image'); + $__no_thumbnail = __('No Thumbnail'); + $__close = __('Close Options'); $__confirmdelete = __('Delete this photo from the server?'); $__nothumb = __('There is no thumbnail associated with this photo.'); $images_script .= "attachmenton = '$__attachment_on';\nattachmentoff = '$__attachment_off';\n"; @@ -265,165 +266,172 @@ function toggleImage(n) { -