diff -r 2f6f6f7551ca -r 32102edaa81b web/wp-admin/includes/media.php --- a/web/wp-admin/includes/media.php Thu Sep 16 15:45:36 2010 +0000 +++ b/web/wp-admin/includes/media.php Mon Nov 19 18:26:13 2012 +0100 @@ -9,7 +9,7 @@ /** * {@internal Missing Short Description}} * - * @since unknown + * @since 2.5.0 * * @return unknown */ @@ -27,7 +27,7 @@ /** * {@internal Missing Short Description}} * - * @since unknown + * @since 2.5.0 * * @param unknown_type $tabs * @return unknown @@ -59,11 +59,12 @@ /** * {@internal Missing Short Description}} * - * @since unknown + * @since 2.5.0 */ function the_media_upload_tabs() { global $redir_tab; $tabs = media_upload_tabs(); + $default = 'type'; if ( !empty($tabs) ) { echo "
" . __('File name:') . " $filename | -|
" . __('File type:') . " $post->post_mime_type | |
" . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ) . " | |
+
+ $image_edit_button + |
+
+ " . __('File name:') . " $filename +" . __('File type:') . " $post->post_mime_type +" . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ). ' '; + if ( !empty( $media_dims ) ) + $item .= "" . __('Dimensions:') . " $media_dims \n"; - if ( !empty($media_dims) ) - $item .= " |
" . __('Dimensions:') . " $media_dims | |
$image_edit_button | |
$send $thumbnail $delete | |
$send $thumbnail $delete | |
\n\t\t\t | "; - if ( !empty($field[$field['input']]) ) - $item .= $field[$field['input']]; + $item .= "\t\t |
---|---|
\n\t\t\t | ";
+ if ( !empty( $field[ $field['input'] ] ) )
+ $item .= $field[ $field['input'] ];
elseif ( $field['input'] == 'textarea' ) {
- $item .= "";
+ if ( 'post_content' == $id && user_can_richedit() ) {
+ // sanitize_post() skips the post_content when user_can_richedit
+ $field['value'] = htmlspecialchars( $field['value'], ENT_QUOTES );
+ }
+ // post_excerpt is already escaped by sanitize_post() in get_attachment_fields_to_edit()
+ $item .= "';
} else {
- $item .= "";
+ $item .= "";
}
- if ( !empty($field['helps']) )
- $item .= " " . join( " \n", array_unique((array) $field['helps']) ) . ' '; + if ( !empty( $field['helps'] ) ) + $item .= "" . join( " \n", array_unique( (array) $field['helps'] ) ) . ' '; $item .= " | \n\t\t
$html | |
{$form_fields['_final']} |
' . __('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; + $_type = isset($type) ? $type : ''; + $_tab = isset($tab) ? $tab : ''; + + $upload_size_unit = $max_upload_size = wp_max_upload_size(); + $sizes = array( 'KB', 'MB', 'GB' ); + + for ( $u = -1; $upload_size_unit > 1024 && $u < count( $sizes ) - 1; $u++ ) { + $upload_size_unit /= 1024; + } - $flash_action_url = admin_url('async-upload.php'); + if ( $u < 0 ) { + $upload_size_unit = 0; + $u = 0; + } else { + $upload_size_unit = (int) $upload_size_unit; + } +?> + + +- +
+ -