wp_get_duotone_filter_id

The timeline below displays how wordpress function wp_get_duotone_filter_id has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.3

/**
 * Returns the prefixed id for the duotone filter for use as a CSS id.
 *
 * @since 5.9.1
 * @deprecated 6.3.0
 *
 * @access private
 *
 * @param array $preset Duotone preset value as seen in theme.json.
 * @return string Duotone filter CSS id.
 */
function wp_get_duotone_filter_id($preset)
{
    _deprecated_function(__FUNCTION__, '6.3.0');
    return WP_Duotone::get_filter_id_from_preset($preset);
}

WordPress Version: 9.1

/**
 * Returns the prefixed id for the duotone filter for use as a CSS id.
 *
 * @since 5.9.1
 * @access private
 *
 * @param array $preset Duotone preset value as seen in theme.json.
 * @return string Duotone filter CSS id.
 */
function wp_get_duotone_filter_id($preset)
{
    if (!isset($preset['slug'])) {
        return '';
    }
    return 'wp-duotone-' . $preset['slug'];
}