-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Deprecate remaining global duotone functions #49702
Deprecate remaining global duotone functions #49702
Conversation
b8594ca
to
0e7119c
Compare
0e7119c
to
6adec60
Compare
/** | ||
* Gets the SVG for the duotone filter definition from a preset. | ||
* | ||
* @param array $preset The duotone preset. | ||
* @return string The SVG for the filter definition. | ||
*/ | ||
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 ); |
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.
Should we have a deprecated call in here?
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.
@@ -5,6 +5,39 @@ | |||
* @package gutenberg | |||
*/ | |||
|
|||
// Register duotone block supports. |
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.
This block looks like it was just moved from below. Is there a reason for that?
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.
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.
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
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_Gutenberg
where 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_styles
is priority 11 instead of 10.Why?
How?
gutenberg_
functions in duotone.php.Testing Instructions
Example content for TT3 block-out, canary, and pilgrimage variations