Make WordPress Core

Changeset 45579


Ignore:
Timestamp:
07/01/2019 03:46:30 AM (5 years ago)
Author:
pento
Message:

Multisite: Use size_format() in display_space_usage().

Deleted code is the best code.

Fixes #28239.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ms.php

    r45416 r45579  
    250250    $percent_used = ( $space_used / $space_allowed ) * 100;
    251251
    252     if ( $space_allowed > 1000 ) {
    253         $space = number_format( $space_allowed / KB_IN_BYTES );
    254         /* translators: Gigabytes */
    255         $space .= __( 'GB' );
    256     } else {
    257         $space = number_format( $space_allowed );
    258         /* translators: Megabytes */
    259         $space .= __( 'MB' );
    260     }
     252    $space = size_format( $space_allowed * MB_IN_BYTES );
    261253    ?>
    262254    <strong>
Note: See TracChangeset for help on using the changeset viewer.