diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 17ac76a2c6..3f9390a892 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -218,11 +218,13 @@ else ' . __('This feature requires iframe support.') . ''; +if (current_user_can('upload_files')) { + $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); + $uploading_iframe_src = "inline-uploading.php?action=view&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 0c9d687832..ae59489740 100644 --- a/wp-admin/edit-page-form.php +++ b/wp-admin/edit-page-form.php @@ -184,11 +184,13 @@ else ' . __('This feature requires iframe support.') . ''; +if (current_user_can('upload_files')) { + $uploading_iframe_ID = (0 == $post_ID ? $temp_ID : $post_ID); + $uploading_iframe_src = "inline-uploading.php?action=view&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 b123186868..eabc9dd0b4 100644 --- a/wp-admin/inline-uploading.php +++ b/wp-admin/inline-uploading.php @@ -4,8 +4,8 @@ require_once('admin.php'); header('Content-Type: text/html; charset=' . get_option('blog_charset')); -if (!current_user_can('edit_posts')) - die(__('You do not have permission to edit posts.')); +if (!current_user_can('upload_files')) + die(__('You do not have permission to upload files.')); $wpvarstoreset = array('action', 'post', 'all', 'last', 'link', 'sort', 'start', 'imgtitle', 'descr', 'attachment');