WP_Duotone::get_filter_id_from_preset( array $preset ): string

This method has been deprecated.

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

Description

Exported for the deprecated function wp_get_duotone_filter_id() .

Parameters

$presetarrayrequired
Duotone preset value as seen in theme.json.

Return

string Duotone filter CSS id.

Source

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;
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.