wp_global_styles_render_svg_filters() – Render the SVG filters supplied by theme.json.

You appear to be a bot. Output may be restricted

Description

Renders the SVG filters supplied by theme.json.

Note that this doesn't render the per-block user-defined filters which are handled by wp_render_duotone_support, but it should be rendered before the filtered content in the body to satisfy Safari's rendering quirks.

Usage

wp_global_styles_render_svg_filters();

Parameters

Returns

void

Source

File name: wordpress/wp-includes/script-loader.php
Lines:

1 to 17 of 17
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;
  }
}
 

 View on GitHub View on Trac