Scheduling block display
Plugin Name: Hug Content Scheduler
This feature allows us to set visibility on blocks so they show for specific dates or for specific seasons. Currently, the paragraph, heading, group, and image blocks are the core blocks that utilize this behavior. Rather than trying to keep up with adding the functionality to additional core block types, anything that can be added to a group block can be scheduled.
After adding a block to the page, you choose which Schedule Type (Date Range or Seasonal Recurrence) and then configure the rest of the settings, depending on your requirements.
Testing
As mentioned above, there are two options for scheduling: specific date range or seasonal (with or without recurrence).
Here are some testing matrices to illustrate the different settings.
Configuration:
Scenario 1: Seasonal (Non-Recurring)
Configuration:
- Schedule Type: Seasonal
- Select Season: Summer (Jun-Aug)
- Enable Recurring Visibility: OFF
- Logic: Targets the upcoming summer of 2026 only.
Expected Behavior: This content is “Year-Locked”. It will only show during the Summer of 2026. It will become hidden after the last day of August 2026.
Seasonal non-recurring header for Summer.
| Testing URL Parameter | Expected Result |
|---|---|
| ?timetravel=summer | Visible |
| ?timetravel=summer-2026 | Visible |
| ?timetravel=winter | Hidden |
| ?timetravel=12/1/2026 | Hidden |
| ?timetravel=summer-2027 | Hidden |
Configuration:
Scenario 2: Seasonal (Recurring)
Configuration:
- Schedule Type: Seasonal
- Select Season: Winter (Dec-Feb)
- Enable Recurring Visibility: ON
- Logic: Targets every December, January, and February forever.
Expected Behavior: This content is “Evergreen.” It will show during the winter months of every year, regardless of the year in the URL.
| Testing URL Parameter | Expected Result |
|---|---|
| ?timetravel=winter | Visible |
| ?timetravel=winter-2030 | Visible |
| ?timetravel=summer | Hidden |
| ?timetravel=summer-2030 | Hidden |
Configuration:
Scenario 3: Specific Date Range
Configuration:
- Schedule Type: Date Range
- Start Date: 6/15/2030
- End Date: 6/30/2030
- Logic: Displays from start date through end date.
| Testing URL Parameter | Expected Result |
|---|---|
| ?timetravel=6/14/2030 | Hidden |
| ?timetravel=6/20/2030 | Visible |
| ?timetravel=7/1/2030 | Hidden |
| ?timetravel=summer-2030 | Visible |
Configuration:
Scenario 4: Start Immediately, end on specific Date.
Configuration:
- Schedule Type: Date Range
- Start Date: Not Set
- End Date: 6/30/2030
- Logic: Display runs through the end date.
Specific Date Range (“now” through 6/30/2030)
| Testing URL Parameter | Expected Result |
|---|---|
| (No Parameter) | Visible |
| ?timetravel=6/20/2030 | Visible |
| ?timetravel=07/01/2030 | Hidden |
Configuration:
Scenario 5: Start on a Date, run forever
Configuration:
- Schedule Type: Date Range
- Start Date: 9/1/2030
- End Date: Not Set
- Logic: Begins on the start date, but runs forever.
| Testing URL Parameter | Expected Result |
|---|---|
| (No Parameter) | Hidden |
| ?timetravel=9/1/2030 | Visible |
| ?timetravel=07/01/2035 | Visible |
