WP_Duotone::get_svg_definitionsprivate staticWP 6.3.0

Get the SVGs for the duotone filters.

Example output: <svg><defs><filter id="wp-duotone-blue-orange">…</filter></defs></svg><svg>…</svg>

Метод класса: WP_Duotone{}

Хуков нет.

Возвращает

Строку. The SVGs for the duotone filters.

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

$result = WP_Duotone::get_svg_definitions( $sources );
$sources(массив) (обязательный)
The duotone presets.

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

С версии 6.3.0 Введена.

Код WP_Duotone::get_svg_definitions() WP 7.1

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