Skip to content

Conversation

@mehulkaklotar
Copy link
Member

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 to wp_filesize everywhere it was used in the plugin. Code and test cases.

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

@mehulkaklotar mehulkaklotar added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure labels Jun 15, 2022
@mehulkaklotar mehulkaklotar added this to the 1.2.0 milestone Jun 15, 2022
@mehulkaklotar mehulkaklotar self-assigned this Jun 15, 2022
Copy link
Member

@mitogh mitogh left a 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.

Copy link
Member

@felixarntz felixarntz left a 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]>
Copy link
Contributor

@akshitsethi akshitsethi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯

Copy link
Member

@felixarntz felixarntz left a 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!

@felixarntz felixarntz merged commit 2f477ea into trunk Jun 15, 2022
@felixarntz felixarntz deleted the add/wp_filesize-fuction branch June 15, 2022 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use wp_filesize instead of filesize if available

6 participants