Skip to content

Commit

Permalink
Coding Standards: Replace usage of deprecated `wp_get_duotone_filter_…
Browse files Browse the repository at this point in the history
…svg()`.

This updates `WP_Theme_JSON::get_svg_filters()` to use `WP_Duotone::get_filter_svg_from_preset()` instead of the `wp_get_duotone_filter_svg()` function, deprecated in WordPress 6.3.

Follow-up to [52757], [56101].

Props justlevine.
See #52217.

git-svn-id: https://develop.svn.wordpress.org/trunk@59455 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Nov 23, 2024
1 parent aa2b4fd commit 2d9937a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/wp-includes/class-wp-theme-json.php
Original file line number Diff line number Diff line change
Expand Up @@ -3325,7 +3325,7 @@ public function get_svg_filters( $origins ) {
continue;
}
foreach ( $duotone_presets[ $origin ] as $duotone_preset ) {
$filters .= wp_get_duotone_filter_svg( $duotone_preset );
$filters .= WP_Duotone::get_filter_svg_from_preset( $duotone_preset );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/wp-includes/deprecated.php
Original file line number Diff line number Diff line change
Expand Up @@ -5190,15 +5190,15 @@ function wp_get_duotone_filter_property( $preset ) {
* Returns the duotone filter SVG string for the preset.
*
* @since 5.9.1
* @deprecated 6.3.0
* @deprecated 6.3.0 Use WP_Duotone::get_filter_svg_from_preset() instead.
*
* @access private
*
* @param array $preset Duotone preset value as seen in theme.json.
* @return string Duotone SVG filter.
*/
function wp_get_duotone_filter_svg( $preset ) {
_deprecated_function( __FUNCTION__, '6.3.0' );
_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Duotone::get_filter_svg_from_preset()' );
return WP_Duotone::get_filter_svg_from_preset( $preset );
}

Expand Down

0 comments on commit 2d9937a

Please sign in to comment.