[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 16:19:26 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:  Awaiting Review
Component:  General      |     Version:  3.2.1
 Severity:  trivial      |  Resolution:
 Keywords:  has-patch    |
-------------------------+------------------------------

Comment (by F J Kaiser):

 Replying to [comment:8 scribu]:
 > A counter example:
 >
 > Instead of get_option() and update_option(), why not have a single
 option() function, with an $action parameter?

 Good example. But size_format doesn't have any sort of clear name that
 says "we convert small sizes to bigger ones for display". I'd ''expect''
 that it works in both directions. Anyway: It shouldn't be discussed here
 as it's not part of this ticket.

 >
 > Re 19067_3.patch:
 >
 > * needs to be moved to wp-includes/deprecated.php
 > * _deprecated_function() should mention size_format() as the replacement

 Done.

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


More information about the wp-trac mailing list