Skip to content

Respect hide_from_feed for calendar-only events in feeds and Query Loops#82

Open
jbouganim wants to merge 2 commits into
a8cteam51:trunkfrom
jbouganim:fix/hide-from-feed
Open

Respect hide_from_feed for calendar-only events in feeds and Query Loops#82
jbouganim wants to merge 2 commits into
a8cteam51:trunkfrom
jbouganim:fix/hide-from-feed

Conversation

@jbouganim

@jbouganim jbouganim commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Issue

Per-date Hide from feed was also removing the date from the calendar, even when Hide from calendar was off. find_event_dates() ignored its context flags and always excluded both feed-hidden and calendar-hidden dates.

Changes proposed in this Pull Request

  • Respect $hide_from_calendar and $hide_from_feed in find_event_dates() so each flag is applied only when its context parameter is true.
  • Calendar queries (get_event_dates_for_date( $date, true, false )) exclude calendar-hidden dates only.
  • Feed queries (get_event_dates_for_date( $date, false, true )) exclude feed-hidden dates only.

Testing instructions

  1. Create or edit an event date with Hide from feed on and Hide from calendar off.
  2. Confirm the date appears on the calendar for that day.
  3. Confirm the same date is excluded from feed-context results (e.g. upcoming list / feed query).
  4. Toggle Hide from calendar on (feed off) and confirm the date disappears from the calendar but remains in feed-context results.
  5. Confirm a date with neither toggle set still appears in both contexts.

Mentions #
@gin0115 @tommusrhodus

Summary by CodeRabbit

  • Bug Fixes
    • Fixed "Hide from calendar" and "Hide from feed" settings to work independently. Calendar-only entries (such as all-day closure markers) now display on calendars while remaining hidden from feeds and lists.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 10ed1063-e1e7-42b9-9d8d-ff6f427b84aa

📥 Commits

Reviewing files that changed from the base of the PR and between d87e9f7 and dfd221a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (4)
  • README.md
  • package.json
  • plugin.php
  • src/classes/class-se-event-dates.php

Walkthrough

This PR changes find_event_dates() so calendar-hidden and feed-hidden flags are filtered independently according to the requested context. Calendar day queries therefore no longer exclude dates that are only marked hidden from feed. The release metadata is updated from 2.1.3 to 2.1.4 in the plugin headers, plugin constant, and package.json, and the README changelog adds a 2.1.4 entry describing the event-date visibility change.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly addresses the main functional change: making the 'Hide from feed' flag work independently for calendar-only events, which is the core fix described in the PR objectives.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tommusrhodus

Copy link
Copy Markdown
Contributor

LGTM, will let @gin0115 have his say.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants