WP_Duotone::get_filter_id_from_presetpublic staticWP 6.3.0

Deprecated since 6.3.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.

Returns the prefixed id for the duotone filter for use as a CSS id.

Exported for the deprecated function wp_get_duotone_filter_id().

Method of the class: WP_Duotone{}

No Hooks.

Returns

String. Duotone filter CSS id.

Usage

$result = WP_Duotone::get_filter_id_from_preset( $preset );
$preset(array) (required)
Duotone preset value as seen in theme.json.

Changelog

Since 6.3.0 Introduced.
Deprecated since 6.3.0

WP_Duotone::get_filter_id_from_preset() code WP 6.8.1

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'] );
	}
	return $filter_id;
}