Mayo Events Manager
Pronounced “my-oh”. Referring to the Spanish word “mayo” which means “May” in English. Mayo Event Manager is a comprehensive WordPress plugin designed to facilitate the management of events with a focus on community engagement and administrative oversight. This plugin allows users to submit events for approval, supports recurring event schedules, and integrates seamlessly with WordPress’s native features like featured images and custom post types. Mayo is meant to be simple, and does not provide all the functionality of a typical event management system. It is designed to be used in conjunction with a BMLT server to provide a simple way to submit events for a specific service body. Also we will not be implementing a calendar view, but rather a list view. There are plenty of other plugins that provide calendar views, and you can make use of the calendar RSS to import the feeds you want.
Dependency on Pretty Permalinks: The REST API utilizes the same URL rewriting functionalities that pretty permalinks employ to map its human-readable routes (like /wp-json/wp/v2/posts) to the appropriate internal processes. If your site uses the “Plain” permalink setting (which is the default in some cases), the REST API endpoint may not function correctly, leading to 404 errors when attempting to access /wp-json/.
-
Event Submission and Approval:
- Users can submit events through a public-facing form.
- Submitted events are saved as pending, requiring admin approval before they are published.
- Admins receive email notifications upon new event submissions, ensuring timely review and approval.
-
Recurring Events:
- Supports daily, weekly, and monthly recurring event patterns.
- Users can specify recurrence intervals and end dates.
- Recurring events are automatically generated based on the specified pattern.
-
Event Details and Customization:
- Events can include detailed information such as event type, start and end dates, times, and location details.
- Supports the use of WordPress’s featured image functionality to visually represent events.
- Allows categorization and tagging of events for better organization and filtering.
-
Service Body Integration:
- Integrates with external service bodies, allowing users to associate events with specific service organizations.
- Fetches and displays service body information dynamically.
-
Email Notifications:
- Sends email notifications to the site admin when a new event is submitted.
- Ensures that admins are promptly informed of new submissions for review.
-
REST API Integration:
- Provides REST API endpoints for submitting events, retrieving event details, and managing settings.
- Facilitates integration with other systems and custom front-end applications.
-
User-Friendly Interface:
- Intuitive form interface for event submission, including validation for required fields like email.
- Admin interface for managing events, including viewing, editing, and approving submissions.
-
Event Announcements:
- Display event-based announcements as banners or modals to highlight important information.
- Use events to announce meeting closures, moves, new meetings, or promote upcoming events.
- Events show as announcements when today’s date falls between the event’s start and end dates.
- Supports filtering by categories and tags to control which events appear as announcements.
- Dismissable with 24-hour persistence – users can re-open via a bell icon.
Announcement Feature
The announcement feature allows you to display event-based announcements prominently on your site. This is useful for: * Meeting closures or changes * New meeting announcements * Breaking news or important updates * Promoting upcoming events
Shortcode Usage:
[mayo_announcement] - Display announcements with default settings (banner mode)
[mayo_announcement mode="modal"] - Display as a modal popup instead of banner
[mayo_announcement categories="announcements,alerts"] - Filter by category slugs
[mayo_announcement tags="urgent,featured"] - Filter by tag slugs
[mayo_announcement time_format="24hour"] - Use 24-hour time format
[mayo_announcement background_color="#ff6600" text_color="#ffffff"] - Custom colors
[mayo_announcement background_color="#dc3545" text_color="#fff" categories="alerts"] - Red alert style
Parameters: * mode – “banner” (sticky top bar) or “modal” (popup). Default: “banner” * categories – Comma-separated category slugs to filter events * tags – Comma-separated tag slugs to filter events * time_format – “12hour” or “24hour”. Default: “12hour” * background_color – Custom background color (hex, e.g., “#ff6600”). Default: CSS default * text_color – Custom text color (hex, e.g., “#ffffff”). Default: CSS default
Widget Usage:
For site-wide announcements without editing templates, use the “Mayo Event Announcements” widget: 1. Go to Appearance > Widgets 2. Add the “Mayo Event Announcements” widget to any widget area (footer recommended for site-wide display) 3. Configure the display mode, categories, tags, and time format
How It Works: * Events appear as announcements when today’s date is between the event’s start_date and end_date * Banner mode shows a fixed bar at the top of the viewport with carousel navigation for multiple events * Modal mode shows a centered popup with a list of all matching events * When dismissed, announcements stay hidden for 24 hours but can be re-opened via a bell icon in the bottom-right corner
Additional Information
Mayo WordPress Plugin
A WordPress plugin for managing and displaying events from a BMLT root server.
CSS Documentation
The plugin includes documentation for the dynamic CSS classes used in the Event Card component. This helps developers understand and customize the appearance of events on their site.
Important Note About Styling
This plugin does not include a built-in CSS editor. To style the event cards, you need to use another plugin like “Simple Custom CSS” or add CSS to your theme’s stylesheet. The documentation is provided to help you understand which CSS classes are available for styling.
Viewing the Documentation
The CSS documentation is available in the WordPress admin area under the Mayo menu. It includes:
- Dynamic classes generated based on event properties
- Examples of how to customize the appearance
Customization
You can customize the appearance of events by adding CSS rules to your theme or using a custom CSS plugin. The documentation provides examples of common customizations, such as:
- Styling specific categories or tags
- Customizing the appearance of different event types
- Adding styles for specific service bodies
Recommended CSS Plugins
- Simple Custom CSS (https://wordpress.org/plugins/simple-custom-css/)
- Custom CSS and JS (https://wordpress.org/plugins/custom-css-js/)
- Advanced Custom CSS (https://wordpress.org/plugins/advanced-custom-css/)
Development
Prerequisites
- Node.js (v14 or higher)
- npm (v6 or higher)
Installation
- Clone the repository
-
Install dependencies:
npm install
-
Build the plugin:
npm run build
Development Workflow
-
Start the development server:
npm run dev
-
Make changes to the code
- Rebuild the plugin as needed
License
This project is licensed under the GPL v2 or later.
Technical Details
- Custom Post Type: Utilizes a custom post type
mayo_eventto store and manage events. - JavaScript Components: Built with React and integrated into the WordPress admin and front-end using Gutenberg components.
- Email Handling: Uses WordPress’s
wp_mailfunction to send notifications. - Data Storage: Stores event metadata using WordPress’s post meta system, ensuring compatibility and scalability.
