wp_get_duotone_filter_id

函数
wp_get_duotone_filter_id ( $preset )
Access
Private
参数
  • (array) $preset Duotone preset value as seen in theme.json.
    Required:
返回值
  • (string) Duotone filter CSS id.
定义位置
相关方法
wp_get_duotone_filter_svgwp_get_duotone_filter_propertywp_render_duotone_filter_presetwp_get_pomo_file_datawp_get_post_terms
引入
5.9.1
弃用
-

wp_get_duotone_filter_id: 这个函数返回用于在图像上产生双色调效果的SVG过滤器的ID。它与wp_get_duotone_filter_svg一起使用,以生成SVG过滤器。

返回duotone过滤器的前缀id,作为CSS id使用。

function wp_get_duotone_filter_id( $preset ) {
	if ( ! isset( $preset['slug'] ) ) {
		return '';
	}

	return 'wp-duotone-' . $preset['slug'];
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-05 17:32:57

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: