A simple Gutenberg-first event management plugin that integrates with WooCommerce Box Office.
If you want to install this plugin, DON'T DOWNLOAD THIS REPO. You can download the latest stable version from the releases page or just click here.
Simple Events uses Composer, a dependency manager for PHP. Visit the official Composer download instructions to install Composer.
Then, run:
composer install
Run npm install
to install all the Node.js dependencies.
Below you will find some information on how to run scripts.
- Use to compile and run the block in development mode.
- Watches for any changes and reports back any errors in your code.
- Use to build production code for your block inside
build
folder. - Runs once and reports back the gzip file sizes of the produced code.
This must be enabled in the settings
before they are shown.
Change the previous link text (defaults to
<< {Event Title}
)
add_filter('se_event_previous_link_text', function( string $link_text, WP_Post $event ) {
return "Previous Event ({$event->post_title})";
}, 10, 2);
Change the next link text (defaults to
{Event Title} >>
)
add_filter('se_event_next_link_text', function( string $link_text, WP_Post $event ) {
return "Next Event ({$event->post_title})";
}, 10, 2);
Change the link text to the calendar if page set in settings, if not set in settings will not show. (defaults to
View Full Calendar
)
add_filter('se_event_calendar_link_text', function( string $link_text ) {
return "View Full Calendar";
}, 10, 1);
When the cron task runs to update the event start date to a future date if its passed and future dates exist.
add_filter('se_event_update_query_dates_interval', function( int $interval ) {
return 'hourly'; // Please use the WP Cron intervals: https://developer.wordpress.org/reference/functions/wp_get_schedules/
}, 10, 1);
add_filter('se_event_update_dates_search_range', function( int $age ) {
return 48 * HOUR_IN_SECONDS; // The number of days to check for events that are older than this.
}, 10, 1);
It is possible to skip and event from being updated by adding a filter to the event.
add_filter('se_event_update_query_dates_skip', function( bool $skip, intget $event ) {
// Skip the event if it is a specific event.
if ( $event === 1234 ) {
return true;
}
return $skip;
}, 10, 2);
When an event has been updated, the se_event_updated_query_dates
is fired.
add_action('se_event_updated_query_dates', function( int $event_id ) {
// Do something with the event.
}, 10, 2);
add_filter('se_calendar_export_query_args', function( array $args ) {
// Modify the query arguments for calendar export
$args['posts_per_page'] = 50; // Export more events
return $args;
}, 10, 1);
add_filter('se_calendar_export_event_location', function( $location_object, int $event_id, array $event_date ) {
// Modify the location object in iCal export
// $location_object is an Eluceo\iCal\Domain\ValueObject\Location object
// You can create a new Location object with additional details
$venue = get_post_meta( $event_id, 'se_event_venue', true );
$full_address = $location_object->getValue();
if ( ! empty( $venue ) ) {
$full_address = $venue . ', ' . $full_address;
}
return new \Eluceo\iCal\Domain\ValueObject\Location( $full_address );
}, 10, 3);
add_filter('se_calendar_export_event', function( $event, int $event_id, array $event_date ) {
// Modify individual event before adding to calendar
// $event is an Eluceo\iCal\Domain\Entity\Event object
return $event;
}, 10, 3);
add_filter('se_calendar_export_calendar', function( $calendar, array $events ) {
// Modify the calendar object before rendering
// $calendar is an Eluceo\iCal\Domain\Entity\Calendar object
return $calendar;
}, 10, 2);
add_filter('se_calendar_export_rendered', function( string $ical_content ) {
// Modify the final iCal text output before sending
return $ical_content;
}, 10, 1);
Simple plugin to add a focal point control to the featured post image.
If you want to use this plugin extension, you can find it at https://github.com/a8cteam51/bamberg-ua/tree/trunk/mu-plugins/team51-focal-point
Copy the team51-focal-point
folder to your mu-plugins
directory.