Skip to content

1.23.0: Pro features free, Cron menu, translatable dates - #288

Merged
seedprod merged 72 commits into
developfrom
fold-pro
Oct 15, 2026
Merged

seedprod merged 72 commits into
developfrom
fold-pro

Conversation

@seedprod

Copy link
Copy Markdown
Contributor

WP Crontrol 1.23.0: Pro features folded into the free plugin.

  • Cron Logs and Cron Insights (formerly WP Crontrol Pro) for everyone; logging off by default, opt in per hook.
  • Freemius removed; one plugin, one entry point.
  • Logger hardening: cron-only logging, no stored event args, URL redaction to origin, bounded memory, nested-run handling, wp_mail filter passthrough.
  • Network-wide tables with per-site pruning (30 days / 10k rows), metrics pruning, uninstall.php.
  • Top-level Cron menu linking to the existing screens (URLs unchanged; Tools > Cron Events stays).
  • Translatable event dates via wp_date() (forum request).
  • One-time new-home panel with John Blackbourn's quote and Install for free cards for Awesome Motive plugins (only on Crontrol screens, dismissible, hidden for active plugins).

Not for release until John approves.

🤖 Generated with Claude Code

johnbillion and others added 30 commits February 14, 2025 15:44
# Conflicts:
#	src/bootstrap.php
# Conflicts:
#	css/wp-crontrol.css
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cron event logging, the Cron Logs screen, Cron Insights and the logs WP-CLI command now ship in WP Crontrol itself (src/Pro). Freemius, the bundled copy of the free plugin, the free-plugin deactivation and the duplicate constants are gone, along with the Pro upsell page.
- Logging is off by default. It's enabled per hook (row action, add-event checkbox, Cron Logs settings) or with a Log All Plugin Hooks control. Tables are only created once logging is turned on.
- Runs are only logged in a cron context (wp_doing_cron, filterable via crontrol/should_log). The hook scan no longer runs on every request, and its option is not autoloaded.
- The logger keeps a stack of runs: nested logged hooks get their own records, listeners and the exception handler are removed after the outermost run, and the shutdown handler only finishes runs still in progress.
- The wp_mail callback is a filter and returns its arguments.
- Event arguments are not stored (opt in with crontrol/log_event_args); PHP and URL events keep only their name and a redacted URL. Logged HTTP URLs lose credentials, query string and fragment.
- PHP 7.4: native mixed types removed.
- Tables are network-wide with a network schema version, verified after dbDelta with an hourly retry. Maintenance prunes every site by age (30 days) and to 10,000 rows per site, and prunes metrics older than 90 days.
- uninstall.php drops the tables and removes the logging options, scheduled jobs and dismissal meta, on every site in a network.
- Text domain is wp-crontrol throughout.
- New-home panel with John Blackbourn's quote and the cross-sell cards.
- Version 1.23.0-dev, draft changelog and FAQ.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Cron Insights legend builds the line break with DOM nodes, never innerHTML (stored XSS via hook names).
- The log details escape event argument displays (stored XSS via URL event URLs).
- Logged HTTP requests keep only their method and a failure flag; responses are not held in memory.
- Logged URLs keep only scheme, host and port; paths can carry tokens too.
- URL events keep their method in the identifying args, so the log can describe them.
- Front-end requests that don't run cron return before reading any logging option.
- Metrics and maintenance are also scheduled on any site that logs events, so a site-only activation in a network still prunes.
- Each observed hook gets its own start and end callbacks, and ending a run also finishes any nested run that an exception left open, so a caught exception no longer corrupts the stack or leaves listeners attached.
- The logs WP-CLI command reports that logging is off instead of querying a missing table.
- Regression tests for each of these.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Runs are identified by hook and call-stack depth, so a caught exception in a recursive hook closes the right run; runs left open by a caught exception are finished when their caller ends or when the next sibling run starts.
- Log details are bounded to what the column holds, long messages are shortened, and the outcome and counters are saved even if the details can't be.
- Clearing logs deletes rows instead of truncating, so IDs are never reused while a cron run still holds one.
- Metrics aggregation takes a database lock, so runs from several sites can't duplicate an hour, and it backfills hours (up to 48) and days (up to 7) that cron missed.
- Regression tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The logger keeps at most 200 messages of up to 1,000 bytes per run and never keeps contexts; later messages are counted, and a warning past the limit still marks the run as failed.
- Messages, HTTP requests and emails are routed through the log, which first checks the call stack and finishes any run whose hook an exception has already left, so activity after a caught exception goes to the parent run.
- Metrics hours and days are only checkpointed after every write succeeds, so a failed write is retried.
- Regression tests for each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Logged messages are bounded before they're put together: strings, context values and prefixes are shortened first, and arrays and objects are summarised instead of print_r'd, so a large value can't exhaust memory.
- The first metrics checkpoint is recorded before the first attempt, so a failure on a fresh install is retried instead of skipped.
- Regression tests for both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seedprod and others added 27 commits October 14, 2026 12:58
…ttings reads, ALTERNATE_WP_CRON logging, uninstall tidy.

- Metrics lock name is scoped to the database and table prefix.
- Insights upcoming view starts now, not at the oldest overdue event.
- Hook names are URL-encoded in log links and filters; "View logs" is translatable.
- The logging setting is read from autoloaded options only, and jobs are only scheduled once logging is on, so admin requests make no extra queries while logging is off.
- With ALTERNATE_WP_CRON, logging starts when wp-cron.php runs in the request.
- uninstall.php drops the tables first, and removes crontrol_seen_tabs, the logging pointer dismissal and the retired-Pro notice.
- Regression tests for these and for the asset guard and the Pro retirement helpers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y retired by network WP Crontrol.

- An hour or day isn't aggregated while a run that started in it is still going, for up to 3 hours. Aggregated buckets are never deleted, so pruned logs or a failed write can't erase metrics.
- A network-active WP Crontrol Pro is only deactivated when WP Crontrol is network active too; otherwise the site keeps using it and admins see how to switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… anywhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…uninstall hook on admin and WP-CLI requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The tables are shared by all networks, so a version left on another network made it skip recreating them after a reinstall.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…how other h2s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Shown on Cron Events only; WPCode tip on the PHP form removed.
- Headline leads with the gift; intro names the Duplicator team; John Blackbourn's note labelled, cards behind a divider with an honest label.
- Secondary buttons; cards only for plugins the site doesn't have.
- Card copy: no scheduled-backups claim for Duplicator, WPVibe claims trimmed.
- After WPVibe installs, the button becomes Set up WPVibe.
- Readme: Cron menu usage, FAQ for turning the menu off, changelog wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Abilities API (WordPress 6.9+): list and get events, list schedules, run an event, pause and
  resume a hook, list logs, get a log, insights summary, and logging on or off for a hook.
  Permissions mirror the admin screens; running PHP cron events also needs edit_files; no
  creating or editing PHP or URL events; logs are site-scoped; refusals are reported by the
  execute callbacks, not as permission errors.
- Cron AI screen: what an assistant can do, availability, example prompts, Connect with WPVibe.
- Cron Alerts screen: email on failed logged runs, each failure (one per hook per hour, ten per
  site per hour) or a daily digest, recipients, test email, and the last failure with a WP Mail
  SMTP pointer. Sent at the end of the request, never from inside a run.
- Logs: failed emails are counted on each run (schema 12), errored runs link to Cron AI, the
  details show a failed email with a WP Mail SMTP pointer, and the empty state explains logging.
- Installs and activations from WP Crontrol buttons are recorded locally only.
- Readme: features, usage, privacy statement, changelog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Ability labels for PHP and URL events come from the display name only, never code or URLs.
- init_db() checks every column exists after dbDelta() before recording the schema version, so a
  failed ALTER is retried instead of silently breaking logging.
- Alert throttling and digest changes run under a database lock with a fresh read, so overlapping
  cron requests can't both pass the limits; if the lock is busy the alert is skipped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…idempotent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…site.

- The logger ignores crontrol/ hooks, and set-hook-logging only enables hooks with scheduled events.
- Queued alerts keep the site they came from and are sent from within it, to its recipients.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d slowest hooks cover every hook.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er breaks listing or running.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng the screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ables catch up after an update

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rds, the panel on every Cron screen, a Duplicator no-backup notice and a WPCode tip

- Buttons say which plugin they install or activate.
- Cron Alerts and Cron AI show a Recommended card with the plugin's icon, bundled locally.
- The new-home panel shows on every Cron screen until dismissed, with a card for each of
  our plugins that isn't active, to people who can install or activate it.
- Cron Events suggests Duplicator when no backup plugin or scheduled backup is found,
  after the panel is dismissed.
- The PHP code field suggests WPCode for code that should run on every page.
- Each suggestion can be dismissed for good, in place, without losing a half-written form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed it

If the save fails, for example on a page left open until its nonce expired, the suggestion
comes back with a note to try again instead of looking dismissed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… stays until it does

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… suggestions; SMTP card heading says alert emails get delivered

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@seedprod
seedprod marked this pull request as ready for review October 15, 2026 14:19
@seedprod
seedprod merged commit 8261de4 into develop Oct 15, 2026
19 checks passed
@seedprod
seedprod deleted the fold-pro branch October 15, 2026 14:19
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