Berestov Element Scheduler

Description

Berestov Element Scheduler replaces the inner HTML of selected frontend elements by schedule.

It can match a parent element by class or ID and replace everything inside that parent with the value you define.

Supported schedule groups:

  • Weekdays
  • Odd and even month days
  • Odd and even ISO weeks
  • Persistent replacement

Features:

  • Unlimited rules
  • Search by class or ID
  • Class mode works across all matched elements
  • Multiple different rules per schedule slot
  • Duplicate prevention inside the same slot
  • Server-side, JavaScript, or Auto replacement mode
  • UTC offset based switching
  • Drag and drop schedule UI
  • Translation-ready admin UI

Use cases:

  • Rotate phone numbers
  • Schedule banners
  • Switch promo blocks
  • Replace HTML snippets by schedule

Days without a rule stay unchanged.

Security

  • Capability checks and nonce validation for all administrative actions.
  • Strict sanitization and option whitelisting for all saved settings.
  • Only explicitly allowed configuration fields are accepted.
  • HTML output follows WordPress capability rules (unfiltered_html).
  • No external requests or file operations performed by the plugin.

Screenshots

  • Global settings and rules list.
  • Weekday calendar with drag and drop.
  • Expanded rule editor.
  • Parity and persistent schedule boxes.

Installation

  1. Upload the plugin folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. Open E Scheduler in the admin menu.
  4. Create one or more rules.
  5. Drag rules into the required schedule box.
  6. Save settings.

FAQ

Does it replace only plain text?

No. It can replace the full inner HTML of the matched parent element.

If I use class mode, does it replace every matched element?

Yes. Class mode replaces all frontend elements that contain the selected class.

Can one slot contain many rules?

Yes. Each slot can contain many different rules, but the same rule cannot be added twice to the same slot.

What happens if one rule is assigned to several schedule groups?

The rule becomes active when any assigned condition matches. It is applied once per request.

Which mode should I use?

Server-side mode uses PHP replacement only and avoids visual flicker. JavaScript mode is suitable for sites that use full page caching. Auto mode prefers server-side output and lets JavaScript correct stale cached markup when needed.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Berestov Element Scheduler” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

1.0.12

  • Switched head and JavaScript footer runtime script delivery to WordPress script APIs.
  • Preserved Auto mode footer injection flow for cached-page recovery and dual delivery behavior.

1.0.11

  • Confirmed the renamed build does not register legacy custom REST routes.
  • Paired frontend output buffering with an explicit shutdown close path.
  • Moved inline client payload and runner output through late escaping.
  • Synced the plugin version metadata after the rename.

1.0.9

  • Fixed JavaScript and Auto mode time context calculation so schedule switching follows the configured plugin GMT offset without applying the browser timezone twice.
  • Keeps Server mode schedule context unchanged.

1.0.8

  • Restored JavaScript mode after 1.0.7 by removing the escaping change that stripped inline client scripts.
  • Kept the menu label and readme security summary.

1.0.7

  • Escaped inline client payload and runner output to satisfy WordPress coding standards checks.
  • Renamed the admin menu label to E Scheduler.
  • Added a short security summary to the readme.

1.0.6

  • Kept Server mode PHP-only by registering client payload and runner hooks only for JavaScript and Auto modes.
  • Clarified admin and readme mode descriptions so Server and Auto stay conceptually distinct.

1.0.5

  • Added a stronger inline payload and runner fallback between head and footer for JavaScript and Auto modes.
  • Kept Server mode unchanged.

1.0.4

  • Rebased JavaScript replacement on the stable 1.0.0 approach and added full schedule data for cache-safe client-side evaluation.
  • Fixed JavaScript time context calculation so browser timezone differences do not break schedules that use the plugin GMT offset.
  • Stabilized Auto mode by reapplying current rules in the browser using the same client-side schedule engine.

1.0.3

  • Restored working JavaScript replacement while keeping schedule evaluation inside the browser for cached pages.
  • Simplified the JavaScript schedule engine so active rules are computed directly from saved rules and schedule groups.
  • Kept Auto mode cache-safe by restoring server-replaced markup only when the current active rule set differs from the cached markup.

1.0.2

  • Fixed a JavaScript mode regression where client-side replacement could stop applying.
  • Added a safe fallback that preserves same-context JavaScript replacement while keeping cached-page schedule correction.
  • Hardened Auto mode behavior for cached pages.

1.0.1

  • Made JavaScript mode schedule-aware on cached pages by evaluating rules in the browser.
  • Added Auto mode with server-side output plus JavaScript correction for stale cached markup.
  • Refined admin mode descriptions for caching-related behavior.

1.0.0

  • Added current-slot markers for weekday and parity schedules.
  • Fixed persistent replacement activation.
  • Final repo-ready release.

0.2.0

  • Added a compact wallet reveal button in the admin footer.
  • Refined the readme tags, upgrade notice, and wording.

0.1.7

  • Clarified rule editor labels for parent matching and inner content replacement.

0.1.5

  • Added persistent replacement schedule box.
  • Added automatic “(copy)” suffix to copied rules.
  • Kept duplicate-safe rule activation across overlapping schedule groups.
  • Refined button styling and admin footer donation note.
  • Fixed plugin checker issues around textdomain loading, nonce flow, and translators comments.

0.1.3

  • Added support for multiple different rules per weekday.
  • Prevented duplicate placement of the same rule inside one day.
  • Kept class replacement working across all matched elements.
  • Updated calendar UI for multi-rule days.
  • Updated readme and translation template.

0.1.2

  • Added translation template.
  • Improved rule drag and drop behavior.
  • Added compact collapsed rule layout.
  • Added per-rule save buttons.
  • Added rule removal from the calendar.
  • Polished admin UI and readme.

0.1.1

  • Initial public build.