Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Deprecate unused public methods
  • Loading branch information
Alex Lende authored and scruffian committed Apr 18, 2023
commit 837f207e86cb0bfec9cd6f58089bcb0b776bbbb6
21 changes: 21 additions & 0 deletions lib/class-wp-duotone-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -971,10 +971,17 @@ public static function migrate_experimental_duotone_support_flag( $settings, $me
/**
* Returns the prefixed id for the duotone filter for use as a CSS id.
*
* Exported for the deprecated function gutenberg_get_duotone_filter_id().
*
* @since 6.3.0
* @deprecated 6.3.0
*
* @param array $preset Duotone preset value as seen in theme.json.
* @return string Duotone filter CSS id.
*/
public static function get_filter_id_from_preset( $preset ) {
_deprecated_function( __FUNCTION__, '6.3.0' );

$filter_id = '';
if ( isset( $preset['slug'] ) ) {
$filter_id = self::get_filter_id( $preset['slug'] );
Expand All @@ -985,21 +992,35 @@ public static function get_filter_id_from_preset( $preset ) {
/**
* Gets the SVG for the duotone filter definition from a preset.
*
* Exported for the deprecated function gutenberg_get_duotone_filter_property().
*
* @since 6.3.0
* @deprecated 6.3.0
*
* @param array $preset The duotone preset.
* @return string The SVG for the filter definition.
*/
public static function get_filter_svg_from_preset( $preset ) {
_deprecated_function( __FUNCTION__, '6.3.0' );

$filter_id = self::get_filter_id_from_preset( $preset );
return self::get_filter_svg( $filter_id, $preset['colors'] );
}

/**
* Gets the CSS filter property value from a preset.
*
* Exported for the deprecated function gutenberg_get_duotone_filter_id().
*
* @since 6.3.0
* @deprecated 6.3.0
*
* @param array $preset The duotone preset.
* @return string The CSS filter property value.
*/
public static function get_filter_css_property_value_from_preset( $preset ) {
_deprecated_function( __FUNCTION__, '6.3.0' );

if ( isset( $preset['colors'] ) && is_string( $preset['colors'] ) ) {
return $preset['colors'];
}
Expand Down