RRZE-Webteam / rrze-downloads

Wordpress-Plugin zur Erstellung von Downloadlisten aus hochgeladenen Medien
http://www.rrze.fau.de
GNU General Public License v3.0
0 stars 0 forks source link

check ob filesize verwendet wird - wäre nicht mehr nötig #31

Open thenickless opened 2 years ago

thenickless commented 2 years ago

https://make.wordpress.org/core/2022/05/02/media-storing-file-size-as-part-of-metadata/

=> when calling the wp_get_attachment_metadata function, developers will easily be able to receive the file size of a selected image without having to call the php function filesize.

thenickless commented 2 years ago

Checked: sollte ersetzt werden:

                $size = size_format( filesize(get_attached_file($file->ID)), $precision );

https://raw.githubusercontent.com/RRZE-Webteam/rrze-downloads/master/includes/Shortcode.php