-
Notifications
You must be signed in to change notification settings - Fork 146
Use wp_filesize instead of filesize if available #344
Copy link
Copy link
Closed
Labels
Good First IssueIssue particularly suitable to be worked on by new contributorsIssue particularly suitable to be worked on by new contributorsInfrastructureIssues for the overall performance plugin infrastructureIssues for the overall performance plugin infrastructure[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing feature
Milestone
Metadata
Metadata
Assignees
Labels
Good First IssueIssue particularly suitable to be worked on by new contributorsIssue particularly suitable to be worked on by new contributorsInfrastructureIssues for the overall performance plugin infrastructureIssues for the overall performance plugin infrastructure[Type] EnhancementA suggestion for improvement of an existing featureA suggestion for improvement of an existing feature
Type
Fields
Give feedbackNo fields configured for issues without a type.
WordPress 6.0 introduced the
wp_filesize()function which should be used in favor of PHP'sfilesize()going forward. We should use it in this plugin where available.Since we currently support WordPress 5.8 and 5.9 as well, it's probably not worth bumping up the requirement just for that. I suggest we instead create a backward compatibility layer. Maybe the easiest approach would be to implement a "polyfill", where we re-implement
wp_filesize()in the main plugin file if the function does not exist (yet).We can then update all module code that calls
filesize()to instead unconditionally callwp_filesize().