Deprecate remaining global duotone functions#49702
Merged
scruffian merged 6 commits intoApr 18, 2023
Merged
Conversation
Merged
b8594ca to
0e7119c
Compare
This was referenced Apr 11, 2023
added 6 commits
April 18, 2023 12:49
0e7119c to
6adec60
Compare
scruffian
reviewed
Apr 18, 2023
| public static function get_filter_svg_from_preset( $preset ) { | ||
| // TODO: This function will be refactored out in a follow-up PR where it will be deprecated. | ||
| $filter_id = gutenberg_get_duotone_filter_id( $preset ); | ||
| $filter_id = self::get_filter_id_from_preset( $preset ); |
Contributor
There was a problem hiding this comment.
Should we have a deprecated call in here?
Contributor
There was a problem hiding this comment.
scruffian
reviewed
Apr 18, 2023
| * @package gutenberg | ||
| */ | ||
|
|
||
| // Register duotone block supports. |
Contributor
There was a problem hiding this comment.
This block looks like it was just moved from below. Is there a reason for that?
Contributor
Author
There was a problem hiding this comment.
It's so you don't have to scroll through 400 lines of deprecated code to see the first line of code that actually does something.
12 tasks
This file contains hidden or 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
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.
What?
Part 2 in a set of duotone php refactoring to fix small issues in duotone rendering.
This part refactors the remaining duotone functions into
WP_Duotone_Gutenbergwhere they have access to private methods and the rest of the duotone code is co-located. Also, added comments for all of the duotone actions and filters explaining what they do and whyoutput_global_stylesis priority 11 instead of 10.Why?
How?
gutenberg_functions in duotone.php.Testing Instructions
Example content for TT3 block-out, canary, and pilgrimage variations