X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/bf5c68485ef07868ad0a91168ecd0092af7661ae..8f374b7233bc2815ccc387e448d208c5434eb961:/wp-admin/includes/media.php diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index ff77e6c0..179bfb8f 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -62,15 +62,9 @@ add_filter('media_upload_tabs', 'update_gallery_tab'); * @since 2.5.0 */ function the_media_upload_tabs() { - global $redir_tab, $is_iphone; + global $redir_tab; $tabs = media_upload_tabs(); - - if ( $is_iphone ) { - unset($tabs['type']); - $default = 'type_url'; - } else { - $default = 'type'; - } + $default = 'type'; if ( !empty($tabs) ) { echo "
" . sprintf( __( 'You are about to delete %s.' ), $filename ) . "
" . __( 'Continue' ) . " " . __( 'Cancel' ) . "' . __('The web browser on your device cannot be used to upload files. You may be able to use the native app for your device instead.') . '
'; return; + } $upload_action_url = admin_url('async-upload.php'); $post_id = isset($_REQUEST['post_id']) ? intval($_REQUEST['post_id']) : 0; @@ -1406,10 +1418,6 @@ if ( ($is_IE || $is_opera) && $max_upload_size > 100 * 1024 * 1024 ) { ?> * @param unknown_type $id */ function media_upload_type_form($type = 'file', $errors = null, $id = null) { - global $is_iphone; - - if ( $is_iphone ) - return; media_upload_header(); @@ -1517,8 +1525,14 @@ var addExtImage = { alt = f.alt.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); - if ( f.caption.value ) - caption = f.caption.value.replace(/'/g, ''').replace(/"/g, '"').replace(//g, '>'); + if ( f.caption.value ) { + caption = f.caption.value.replace(/\r\n|\r/g, '\n'); + caption = caption.replace(/<[a-zA-Z0-9]+( [^<>]+)?>/g, function(a){ + return a.replace(/[\r\n\t]+/, ' '); + }); + + caption = caption.replace(/\s*\n\s*/g, '- +
@@ -1920,7 +1935,7 @@ function wp_media_insert_url_form( $default_view = 'image' ) {- Switch to the new uploader.'); ?> + Switch to the multi-file uploader.'); ?>