Skip to content

Commit 2d9937a

Browse files
Coding Standards: Replace usage of deprecated wp_get_duotone_filter_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
1 parent aa2b4fd commit 2d9937a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/wp-includes/class-wp-theme-json.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3325,7 +3325,7 @@ public function get_svg_filters( $origins ) {
33253325
continue;
33263326
}
33273327
foreach ( $duotone_presets[ $origin ] as $duotone_preset ) {
3328-
$filters .= wp_get_duotone_filter_svg( $duotone_preset );
3328+
$filters .= WP_Duotone::get_filter_svg_from_preset( $duotone_preset );
33293329
}
33303330
}
33313331
}

src/wp-includes/deprecated.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5190,15 +5190,15 @@ function wp_get_duotone_filter_property( $preset ) {
51905190
* Returns the duotone filter SVG string for the preset.
51915191
*
51925192
* @since 5.9.1
5193-
* @deprecated 6.3.0
5193+
* @deprecated 6.3.0 Use WP_Duotone::get_filter_svg_from_preset() instead.
51945194
*
51955195
* @access private
51965196
*
51975197
* @param array $preset Duotone preset value as seen in theme.json.
51985198
* @return string Duotone SVG filter.
51995199
*/
52005200
function wp_get_duotone_filter_svg( $preset ) {
5201-
_deprecated_function( __FUNCTION__, '6.3.0' );
5201+
_deprecated_function( __FUNCTION__, '6.3.0', 'WP_Duotone::get_filter_svg_from_preset()' );
52025202
return WP_Duotone::get_filter_svg_from_preset( $preset );
52035203
}
52045204

0 commit comments

Comments
 (0)