WP_Duotone::get_svg_definitions( array $sources ): string

This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

Get the SVGs for the duotone filters.

Description

Example output:

……

Parameters

$sourcesarrayrequired
The duotone presets.

Return

string The SVGs for the duotone filters.

Source

private static function get_svg_definitions( $sources ) {
	$svgs = '';
	foreach ( $sources as $filter_id => $filter_data ) {
		$colors = $filter_data['colors'];
		$svgs  .= self::get_filter_svg( $filter_id, $colors );
	}
	return $svgs;
}

Changelog

VersionDescription
6.3.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.