The WP Museum Calendar plugin acts as an interface to and provide additional functionality for other popular calendar plugins.
WP Museum Calendar offers several benefits:
- Access to calendar and event information from templates
- Templating via mustache for simple presentation of common date/time formats
- API endpoints to query events by date ranges
Currently WP Museum Calendar works with the All-in-One Event Calendar by Time.ly with plans to support other calendar plugins in the future.
- Install and activate All-in-One Event Calendar by Time.ly
- Install and activate WP Museum Calendar
Create your events via the installed plugin's interface. Then from a WordPress template, create a new CMOA_Calendar
object:
$calendar = new CMOA_Calendar();
$start = new DateTime('2017-01-01');
$end = new DateTime('2017-01-31');
// get_event_between_dates expects $start and $end as UNIX timestamps
$events = $calendar->get_event_between_dates($start->format('U'), $start->format('U'));
// Optionally pass an array of category/tag IDs to filter by
$filters['cat_ids'][] = 12;
$filters['tag_ids'][] = 34;
$filtered_events = $calendar->get_event_between_dates($start->format('U'), $start->format('U'), $filters);
$upcoming_events = $calendar->all_upcoming_events($filters);
// Optionally pass a specific taxonomy
$categories = $calendar->calendar_categories($taxonomy);
- Create base class to be an interface to future adapters
- Transition existing base class to function as All-in-One calendar adapter