[wp-trac] [WordPress Trac] #47459: Introduce new a function to retrieve size of files
WordPress Trac
noreply at wordpress.org
Sat Jun 1 23:00:15 UTC 2019
#47459: Introduce new a function to retrieve size of files
-----------------------------+-----------------------------
Reporter: justinahinon | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Keywords:
Focuses: |
-----------------------------+-----------------------------
While working on a plugin, I realized that there was not a dedicated
WordPress function to retrieve the size of the media library files. The
question does not seem to have been asked on the trac previously (after a
brief search).
So I think it would be good to introduce such a function. It would not
take long to write since PHP already provides filesize(). It could be a
new function or it could be added to an existing one (I'm thinking of
[https://developer.wordpress.org/reference/functions/wp_get_attachment_metadata
wp_get_attachment_metadata()] ).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47459>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list