Eleven months ago we announced the launch of our new website and development initiative for Sugar Calendar. It has taken longer than we intended, but today we are pleased to release the first beta version of Sugar Calendar 2.0.
2.0 is a complete re-write of the plugin from the ground-up with an intense focus on the underlying events database. Focusing on the database was critically important to ensure we can build Sugar Calendar into the full-featured platform we’ve been hinting at for the past year. With the new database structure we’ve been able to significantly improve performance and scalability of Sugar Calendar. It also provides us a lot more flexibility for future features, such as advanced recurring events, better event scheduling, and more date-based features.
The new database, however, is not the only thing new in 2.0. We have also completely rebuilt the user interface of the plugin in order to set the foundation for the features we’ll be rolling out in the coming months.
Upon installing version 2.0 beta, site administrators will be shown a database upgrade notice.
This upgrade routine will migrate the existing events to the new database schema. Depending on the number of events on the site, this upgrade could take a few moments or even several hours. If you have a large database, please be patient and allow it to finish migrating all of the data.
New event management interfaces
Once the migration is complete, you can navigate to the new top-level Calendar page to see the completely new events management interface, which looks like this:
By default site owners are shown a monthly calendar view, but this can be changed to a weekly view, daily view, or even list view.
We have also introduced a new, simplified interface for creating events:
“Categories” renamed to “Calendars”
To more closely mirror other existing calendar applications, the “Categories” taxonomy has been renamed to “Calendars.” We all organize our events differently, but we’ve found that rarely do event categories overlap, so we’ve simplified this a bit and tried to make it feel a bit more natural and familiar.
We’ve also added support for calendar colors, so now you’ll be able to visually tell what events belong to which calendars.
Sugar Calendar now includes helper functions that developers can use when extending the plugin, to interface with the new
sc_eventmeta database tables:
sugar_calendar_add_event( $data = array() )
This function can be used to create a new event.
sugar_calendar_delete_event( $event_id = 0 )
This function can be used to delete an event.
sugar_calendar_update_event( $event_id = 0, $data = array() )
This function can be used to update an existing event.
sugar_calendar_get_event( $event_id = 0 )
This function can be used to retrieve an event from the database.
sugar_calendar_get_event_by( $field = ”, $value = ” )
This function can be used to retrieve an event from the database by a specific field.
sugar_calendar_get_event_by_object( $object_id = 0, $object_type = ‘post’ )
This function can be used to retrieve an event via its associated WordPress post object.
sugar_calendar_get_events( $args = array() )
This function can be used to retrieve an array of event objects.
We have also introduced an event metadata API that exactly mimics the WordPress core metadata API. It includes the following functions:
- add_event_meta( $id, $meta_key, $meta_value, $unique = false )
- delete_event_meta( $id, $meta_key, $meta_value = ” )
- get_event_meta( $id, $meta_key = ”, $single = false )
- update_event_meta( $id, $meta_key, $meta_value, $prev_value = ” )
To help control what logged-in users can see in the admin area in relation to events, we have introduced a series of new capabilities.
The new capabilities are:
This is a significant update for Sugar Calendar and so we are testing it as extensively as possible, and we’d love help! If you’d like to help us test the beta, please follow the steps below:
- Update Sugar Calendar to version 1.6.8. Access to the beta will be made available to all Sugar Calendar users; no license key is required. For priority support during this beta period, please make sure your license key is active. Don’t have one? Purchase one today.
- Navigate to Events > Settings and check the box next to “Get Beta Versions”.
- Wait for a new 2.0.0-beta-1 update notification to show up on your Plugins page. This could take a few minutes or hours.
- Install the beta version.
- Follow any prompts for upgrade routines.
- Test the complete functionality of the plugin.
That’s it! If you discover any problems with the new version or wish to leave feedback of any kind, please get in touch with us through our support page.