wp_global_styles_render_svg_filters
函数
wp_global_styles_render_svg_filters ( No parameters )
- 定义位置
-
-
wp-includes/script-loader.php
, line 2458
-
wp-includes/script-loader.php
- 引入
- 5.9.1
- 弃用
- –
渲染由theme.json提供的SVG过滤器。
注意,这不会渲染由wp_render_duotone_support处理的每块用户定义的过滤器,但它应该在主体中的过滤器内容之前渲染,以满足Safari的渲染怪癖。
function wp_global_styles_render_svg_filters() { /* * When calling via the in_admin_header action, we only want to render the * SVGs on block editor pages. */ if ( is_admin() && ! get_current_screen()->is_block_editor() ) { return; } $filters = wp_get_global_styles_svg_filters(); if ( ! empty( $filters ) ) { echo $filters; } }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。