wpce_colors v2.8
Filters the colors available to the WPCE color input type.
Parameters
object[] $colorsThe available colors.
Example
php
add_filter('wpce_colors', function (array $colors) {
$colors[] = (object) [
'id' => 'primary',
'label' => 'Primärfarbe',
'hex' => '#3190cf',
];
$colors[] = (object) [
'id' => 'text-default',
'label' => 'Textfarbe',
'hex' => '#222222',
];
$colors[] = (object) [
'id' => 'text-highlighted',
'label' => 'Hervorgehoben',
'hex' => '#ffff00',
'alpha' => 0.5,
];
return $colors;
});