[wp-trac] [WordPress Trac] #19067: Duplicate functionality in core: size_format() and wp_convert_bytes_to_hr()

WordPress Trac wp-trac at lists.automattic.com
Thu Oct 27 22:51:28 UTC 2011


#19067: Duplicate functionality in core: size_format() and wp_convert_bytes_to_hr()
------------------------------+-----------------------------
 Reporter:  l3rady            |       Owner:
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Future Release
Component:  General           |     Version:  3.2.1
 Severity:  trivial           |  Resolution:
 Keywords:  has-patch commit  |
------------------------------+-----------------------------

Comment (by F J Kaiser):

 Replying to [comment:13 scribu]:
 > The output from size_format() is preferred, since it's meant to be read
 by users.

 Agree, as more readable (I guess the {{{_hr}}} doesn't stand for human
 readable). If we really need to keep the output of
 {{{wp_convert_bytes_to_hr();}}}, it's not too hard to do some
 {{{str_replace()}}} logic wrapped around the outcoming of
 {{{size_format();}}}. Speaking for myself: I'm satisfied how the patch
 works (but we could move to another ticket and replace "B" with
 "Byte(s)").

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19067#comment:14>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list