Ticket #19067: 19067_3.patch
File 19067_3.patch, 1.3 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/template.php
774 774 775 775 /** 776 776 * {@internal Missing Short Description}} 777 * @see size_format() 777 778 * 778 779 * @since 2.3.0 780 * @deprecated in favor of size_format() 779 781 * 780 * @param unknown_type $bytes781 * @return unknown782 * @param int|string $bytes Number of bytes. Note max integer size for integers. 783 * @return bool|string False on failure. Number string on success. 782 784 */ 783 785 function wp_convert_bytes_to_hr( $bytes ) { 784 $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' ); 785 $log = log( $bytes, 1024 ); 786 $power = (int) $log; 787 $size = pow(1024, $log - $power); 788 return $size . $units[$power]; 786 _deprecated_function( __FUNCTION__, '3.3' ); 787 return size_format( $bytes ); 789 788 } 790 789 791 790 /** … … 811 810 */ 812 811 function wp_import_upload_form( $action ) { 813 812 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 814 $size = wp_convert_bytes_to_hr( $bytes );813 $size = size_format( $bytes ); 815 814 $upload_dir = wp_upload_dir(); 816 815 if ( ! empty( $upload_dir['error'] ) ) : 817 816 ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>