WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/21/2015 02:02:59 PM (5 years ago)
Author:
DrewAPicture
Message:

Filesystem: Following the introduction of the KB|MB|GB|TB_IN_BYTES constants in [35286], use them in various places in core.

Props sudar.
Fixes #22405.

File:
1 edited

Legend:

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

    r35289 r35325  
    26392639    $bytes = (int) $size;
    26402640    if ( strpos( $size, 'k' ) !== false )
    2641         $bytes = intval( $size ) * 1024;
     2641        $bytes = intval( $size ) * KB_IN_BYTES;
    26422642    elseif ( strpos( $size, 'm' ) !== false )
    2643         $bytes = intval($size) * 1024 * 1024;
     2643        $bytes = intval($size) * MB_IN_BYTES;
    26442644    elseif ( strpos( $size, 'g' ) !== false )
    2645         $bytes = intval( $size ) * 1024 * 1024 * 1024;
     2645        $bytes = intval( $size ) * GB_IN_BYTES;
    26462646    return $bytes;
    26472647}
Note: See TracChangeset for help on using the changeset viewer.