Make WordPress Core

Ticket #19067: 19067_3.patch

File 19067_3.patch, 1.3 KB (added by F J Kaiser, 13 years ago)

Same as previous patch, but better/more intense phpDocBlock

  • wp-admin/includes/template.php

     
    774774
    775775/**
    776776 * {@internal Missing Short Description}}
     777 * @see size_format()
    777778 *
    778779 * @since 2.3.0
     780 * @deprecated in favor of size_format()
    779781 *
    780  * @param unknown_type $bytes
    781  * @return unknown
     782 * @param int|string $bytes Number of bytes. Note max integer size for integers.
     783 * @return bool|string False on failure. Number string on success.
    782784 */
    783785function 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 );
    789788}
    790789
    791790/**
     
    811810 */
    812811function wp_import_upload_form( $action ) {
    813812        $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
    814         $size = wp_convert_bytes_to_hr( $bytes );
     813        $size = size_format( $bytes );
    815814        $upload_dir = wp_upload_dir();
    816815        if ( ! empty( $upload_dir['error'] ) ) :
    817816                ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>