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
Use wp_filesize
instead of filesize
if available
#376
Conversation
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.
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 <hello@crisoforo.com>
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 💯
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
filesize
function towp_filesize
everywhere it was used in the plugin. Code and test cases.Checklist
[Focus]
orInfrastructure
label.[Type]
label.no milestone
label.