
什么是PHP Worker及应该如何使用
wp_get_duotone_filter_id ( $preset )
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']; }