WordPress.org

Make WordPress Core

Ticket #19067: 19067.6.patch

File 19067.6.patch, 2.5 KB (added by SergeyBiryukov, 16 months ago)
  • wp-admin/includes/deprecated.php

     
    10151015 * @since 1.2.0 
    10161016 * @deprecated 3.5.0 
    10171017 * @deprecated Use image_resize() 
    1018  * @see  image_resize() 
     1018 * @see image_resize() 
    10191019 * 
    10201020 * @param mixed $file Filename of the original image, Or attachment id. 
    10211021 * @param int $max_side Maximum length of a single side for the thumbnail. 
     
    10231023 * @return string Thumbnail path on success, Error string on failure. 
    10241024 */ 
    10251025function wp_create_thumbnail( $file, $max_side, $deprecated = '' ) { 
    1026         _deprecated_function( __FUNCTION__, '3.5', 'image_resize' ); 
     1026        _deprecated_function( __FUNCTION__, '3.5', 'image_resize()' ); 
    10271027        return apply_filters( 'wp_create_thumbnail', image_resize( $file, $max_side, $max_side ) ); 
    10281028} 
     1029 
     1030/** 
     1031 * {@internal Missing Short Description}} 
     1032 * 
     1033 * @since 2.3.0 
     1034 * @deprecated 3.6.0 
     1035 * @deprecated Use size_format() 
     1036 * 
     1037 * @param unknown_type $bytes 
     1038 * @return unknown 
     1039 */ 
     1040function wp_convert_bytes_to_hr( $bytes ) { 
     1041        _deprecated_function( __FUNCTION__, '3.6', 'size_format()' ); 
     1042        return size_format( $bytes ); 
     1043} 
  • wp-admin/includes/template.php

     
    780780 */ 
    781781function wp_import_upload_form( $action ) { 
    782782        $bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() ); 
    783         $size = wp_convert_bytes_to_hr( $bytes ); 
     783        $size = size_format( $bytes ); 
    784784        $upload_dir = wp_upload_dir(); 
    785785        if ( ! empty( $upload_dir['error'] ) ) : 
    786786                ?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p> 
  • wp-includes/media.php

     
    11231123/** 
    11241124 * {@internal Missing Short Description}} 
    11251125 * 
    1126  * @since 2.3.0 
    1127  * 
    1128  * @param unknown_type $bytes 
    1129  * @return unknown 
    1130  */ 
    1131 function wp_convert_bytes_to_hr( $bytes ) { 
    1132         $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' ); 
    1133         $log   = log( $bytes, 1024 ); 
    1134         $power = (int) $log; 
    1135         $size  = pow( 1024, $log - $power ); 
    1136         return $size . $units[$power]; 
    1137 } 
    1138  
    1139 /** 
    1140  * {@internal Missing Short Description}} 
    1141  * 
    11421126 * @since 2.5.0 
    11431127 * 
    11441128 * @return unknown