From 0b402a8dc1492983d023d91a66a4db12f3d2e213 Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Wed, 21 Nov 2012 15:10:17 +0000 Subject: [PATCH] media-new.php: Remove unused scripts, strings, error handling, save handling, and save button. fixes #22083. git-svn-id: https://develop.svn.wordpress.org/trunk@22764 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/includes/media.php | 9 +--- wp-admin/media-new.php | 88 ++++++++++++++----------------------- 2 files changed, 34 insertions(+), 63 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index ce9a944440..b6d0044008 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -2185,16 +2185,11 @@ function media_upload_html_bypass() { add_action('post-html-upload-ui', 'media_upload_html_bypass'); /** - * Displays the "After a file has been uploaded..." message. + * Used to display a "After a file has been uploaded..." help message. * * @since 3.3.0 */ -function media_upload_text_after() { - ?> - - add_help_tab( array( - 'id' => 'overview', - 'title' => __('Overview'), - 'content' => - '

' . __('You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:') . '

' . - '' . - '

' . __('Basic image editing is available after upload is complete. Make sure you click Save before leaving this screen.') . '

' - ) ); - get_current_screen()->set_help_sidebar( - '

' . __('For more information:') . '

' . - '

' . __('Documentation on Uploading Media Files') . '

' . - '

' . __('Support Forums') . '

' - ); +$title = __('Upload New Media'); +$parent_file = 'upload.php'; - require_once('./admin-header.php'); +get_current_screen()->add_help_tab( array( +'id' => 'overview', +'title' => __('Overview'), +'content' => + '

' . __('You can upload media files here without creating a post first. This allows you to upload files to use with posts and pages later and/or to get a web link for a particular file that you can share. There are three options for uploading files:') . '

' . + '' +) ); +get_current_screen()->set_help_sidebar( + '

' . __('For more information:') . '

' . + '

' . __('Documentation on Uploading Media Files') . '

' . + '

' . __('Support Forums') . '

' +); - $form_class = 'media-upload-form wp-upload-form type-form validate'; +require_once( ABSPATH . 'wp-admin/admin-header.php' ); - if ( get_user_setting('uploader') ) - $form_class .= ' html-uploader'; - ?> -
+$form_class = 'media-upload-form wp-upload-form type-form validate'; + +if ( get_user_setting('uploader') || isset( $_GET['browser-uploader'] ) ) + $form_class .= ' html-uploader'; +?> +

@@ -83,22 +68,13 @@ if ( $_POST ) {
- -
+