wp_global_styles_render_svg_filters()WP 5.9.1

Устарела с версии 6.3.0 SVG generation is handled on a per-block basis in block supports.. Больше не поддерживается и может быть удалена. Рекомендуется заменить эту функцию на аналог.

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.

Хуков нет.

Возвращает

null. Ничего (null).

Использование

wp_global_styles_render_svg_filters();

Список изменений

С версии 5.9.1 Введена.
Устарела с 6.3.0 SVG generation is handled on a per-block basis in block supports.

Код wp_global_styles_render_svg_filters() WP 6.5.2

function wp_global_styles_render_svg_filters() {
	_deprecated_function( __FUNCTION__, '6.3.0' );

	/*
	 * 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;
	}
}