-
Notifications
You must be signed in to change notification settings - Fork 26
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
[WIP] Close #490: Restore compat with Perfect Images Retina Support #655
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is just grabbing the WPR2X code that was deleted. It's no longer wired into our stuff, so it won't do anything yet.
- Rename the filenames and classnames to comply with PSR4 - Add PSR4 namespacing to classes - Add revised namespace to composer for autoloading
Add the check for Perfect Images plugin install present, and load compatibility classes when it's there. Clean more comments and rename static $_instance property -> $instance
There is no default context; it must be provided. The intention is that we have 2 contexts to choose from. (should be replaced with an enum when we get to use php8.1)
The can_backup() method is identical in both contexts, so we can move the logic to the parent method here, and only overload it in the Noop context where it returns differently.
Re-namespace and change filenames to bring the compatibility classes more in line with PS4 in preparation for adding unit tests. Adjust composer to point namespace to proper directory. Create a method to filter media sizes, where we can add @2x sizes into into the files array of a media we are about to optimize. (Starts by just returning the given files array.)
We don't need these. Classes will not directly output anything, and they're killing the unit tests before they can run when we need to mock them.
Closing this. Replacement is #656. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #490