-
Notifications
You must be signed in to change notification settings - Fork 139
Use wp_filesize instead of filesize if available
#376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
mitogh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small suggestion on the doc block since 6.0 was already released.
Looking good overall.
felixarntz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mehulkaklotar Thank you, that looks solid. Just one tiny documentation follow-up comment.
Co-authored-by: Crisoforo Gaspar Hernández <[email protected]>
akshitsethi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
felixarntz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, thank you @mehulkaklotar!
Summary
WordPress 6.0 introduced the wp_filesize() function which should be used in favor of PHP's filesize() going forward.
Fixes #344
Relevant technical choices
This PR changes
filesizefunction towp_filesizeeverywhere it was used in the plugin. Code and test cases.Checklist
[Focus]orInfrastructurelabel.[Type]label.no milestonelabel.