Skip to content

Commit

Permalink
Deprecate unused public methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Lende committed Apr 11, 2023
1 parent 3fab898 commit e874e41
Showing 1 changed file with 21 additions and 0 deletions.
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

0 comments on commit e874e41

Please sign in to comment.