agileware / wp-civicrm-ux

WordPress CiviCRM UX - User Experience enhancements
GNU General Public License v2.0
7 stars 12 forks source link

Using Event Types with spaces results in colors not being displayed #35

Open mclwill opened 6 months ago

mclwill commented 6 months ago

We have a number of event types with spaces eg. 'Volunteer Meetup'.

When using the Events Calendar I am not getting the correct color formatting for these type of events

However when these are processed in the get_events_all function in json-all-events.php these types have their color removed.

This code is the reason for this : if (!ctype_alnum($k)) { unset($colors[$k]); }

Not sure why this is needed - I have removed from my implementation and I am getting the result I want.

Not sure if this is a bug or intended. If the latter it would be good to see the documentation reflect this requirement