Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@ Copy the `team51-focal-point` folder to your `mu-plugins` directory.

## Changelog

### 2.1.4

- **Event date visibility:** fixed `find_event_dates()` so **Hide from calendar** and **Hide from feed** are applied independently based on the requesting context. Calendar day queries no longer exclude dates marked **Hide from feed**, allowing calendar-only entries (for example all-day closed markers) to appear on the calendar while remaining hidden from feed/list surfaces.

### 2.1.3

- **Calendar grid alignment:** fixed month grid date placement when WordPress **Week Starts On** is set to Sunday (or any `start_of_week` other than Monday). Dates and events now appear under the correct weekday column.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wpcomsp-simple-events",
"version": "2.1.3",
"version": "2.1.4",
"description": "A simple Gutenberg-first event management plugin that integrates with WooCommerce Box Office.",
"author": {
"name": "WordPress.com Special Projects Team",
Expand Down
4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Simple Events Plugin bootstrap file.
*
* @since 1.0.0
* @version 2.1.3
* @version 2.1.4
* @author WordPress.com Special Projects
* @license GPL-3.0-or-later
*
Expand All @@ -14,7 +14,7 @@
* Description: Event management frontend for WooCommerce Box Office.
* Requires at least: 6.5
* Tested up to: 6.9
* Version: 2.1.3
* Version: 2.1.4
* Requires PHP: 8.0
* Author: WordPress.com Special Projects
* Author URI: https://wpspecialprojects.wordpress.com
Expand Down
12 changes: 10 additions & 2 deletions src/classes/class-se-event-dates.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,19 @@ public static function find_event_dates( $start_date, $end_date, $hide_from_cale

$mapped = self::map_events_dates_to_event_dates( $query->posts );

// Remove the event dates that are hidden from the calendar or feed.
// Remove event dates hidden from the requested contexts.
return array_filter(
$mapped,
function ( $event_date ) use ( $hide_from_calendar, $hide_from_feed ) {
return ! $event_date['event_hide_from_calendar'] && ! $event_date['event_hide_from_feed'];
if ( $hide_from_calendar && $event_date['event_hide_from_calendar'] ) {
return false;
}

if ( $hide_from_feed && $event_date['event_hide_from_feed'] ) {
return false;
}

return true;
}
);
}
Expand Down
Loading