Ticket #19067: 19067_5.patch
File 19067_5.patch, 1.8 KB (added by , 13 years ago) |
---|
-
wp-admin/includes/deprecated.php
853 853 function type_url_form_file() { 854 854 __deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" ); 855 855 return wp_media_insert_url_form( 'file' ); 856 } 857 858 /** 859 * @since 2.3.0 860 * @deprecated 3.4.0 861 * @deprecated Use size_format() 862 * @see size_format() 863 */ 864 function wp_convert_bytes_to_hr( $bytes ) { 865 _deprecated_function( __FUNCTION__, '3.3', 'size_format()' ); 866 867 return size_formate( $bytes ); 856 868 } 869 No newline at end of file -
wp-admin/includes/template.php
775 775 /** 776 776 * {@internal Missing Short Description}} 777 777 * 778 * @since 2.3.0779 *780 * @param unknown_type $bytes781 * @return unknown782 */783 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];789 }790 791 /**792 * {@internal Missing Short Description}}793 *794 778 * @since 2.5.0 795 779 * 796 780 * @return unknown … … 811 795 */ 812 796 function wp_import_upload_form( $action ) { 813 797 $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 814 $size = wp_convert_bytes_to_hr( $bytes );798 $size = size_format( $bytes ); 815 799 $upload_dir = wp_upload_dir(); 816 800 if ( ! empty( $upload_dir['error'] ) ) : 817 801 ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>