Replace deprecated wp_convert_bytes_to_hr() with size_format(). Closes #3154

This commit is contained in:
Coen Jacobs 2013-05-14 11:33:19 +02:00
parent 3c79056aa8
commit 1ee8dfde24
2 changed files with 7 additions and 7 deletions

View File

@ -288,7 +288,7 @@ if ( class_exists( 'WP_Importer' ) ) {
$action = 'admin.php?import=woocommerce_tax_rate_csv&step=1';
$bytes = apply_filters( 'import_upload_size_limit', wp_max_upload_size() );
$size = wp_convert_bytes_to_hr( $bytes );
$size = size_format( $bytes );
$upload_dir = wp_upload_dir();
if ( ! empty( $upload_dir['error'] ) ) :
?><div class="error"><p><?php _e('Before you can upload your import file, you will need to fix the following error:'); ?></p>
@ -341,4 +341,4 @@ if ( class_exists( 'WP_Importer' ) ) {
return 60;
}
}
}
}

View File

@ -111,9 +111,9 @@ function woocommerce_status_report() {
$memory = woocommerce_let_to_num( WP_MEMORY_LIMIT );
if ( $memory < 67108864 ) {
echo '<mark class="error">' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: <a href="%s">Increasing memory allocated to PHP</a>', 'woocommerce' ), wp_convert_bytes_to_hr( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark>';
echo '<mark class="error">' . sprintf( __( '%s - We recommend setting memory to at least 64MB. See: <a href="%s">Increasing memory allocated to PHP</a>', 'woocommerce' ), size_format( $memory ), 'http://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP' ) . '</mark>';
} else {
echo '<mark class="yes">' . wp_convert_bytes_to_hr( $memory ) . '</mark>';
echo '<mark class="yes">' . size_format $memory ) . '</mark>';
}
?></td>
</tr>
@ -123,11 +123,11 @@ function woocommerce_status_report() {
</tr>
<tr>
<td><?php _e( 'WP Max Upload Size','woocommerce' ); ?>:</td>
<td><?php echo wp_convert_bytes_to_hr( wp_max_upload_size() ); ?></td>
<td><?php echo size_format( wp_max_upload_size() ); ?></td>
</tr>
<tr>
<td><?php _e('PHP Post Max Size','woocommerce' ); ?>:</td>
<td><?php if ( function_exists( 'ini_get' ) ) echo wp_convert_bytes_to_hr( woocommerce_let_to_num( ini_get('post_max_size') ) ); ?></td>
<td><?php if ( function_exists( 'ini_get' ) ) echo size_format( woocommerce_let_to_num( ini_get('post_max_size') ) ); ?></td>
</tr>
<tr>
<td><?php _e('PHP Time Limit','woocommerce' ); ?>:</td>
@ -710,4 +710,4 @@ function woocommerce_status_tools() {
</tbody>
</table>
<?php
}
}