Repository navigation
Releases: Bonsai-Systems/bonsai-post-expiry
Releases · Bonsai-Systems/bonsai-post-expiry
Release list
Bonsai Post Expiry 1.2.1
Changed
- The Overview's cron notice now checks that cron is actually running, not just whether
DISABLE_WP_CRONis set. If the hourly expiry check is more than an hour overdue, it warns that cron isn't running and says what to check: the host's server cron, or a firewall (WAF), cache or security plugin blockingwp-cron.php. - On sites where the host runs a server cron (
DISABLE_WP_CRONset) and the hourly check is on time, the notice now confirms that it's working instead of asking you to check with the host.
v1.2.0
Added
- Settings tab under Bonsai → Post Expiry (Administrators only,
manage_options). Tick the post categories that need an expiry date. Stored in the non-autoloadedbpe_settingsoption with the Settings API. - Required expiry: a post in a ticked category can't be published, scheduled or updated without an expiry date. Drafts can still be saved without one.
- Classic editor: Publish / Schedule / Update is stopped with a message in the Post Expiry box. If the script doesn't run, the server saves a new publish as Draft and says why. A post that is already live is never unpublished by this check; it gets a warning instead.
- Block editor (
assets/admin-block.js): a warning notice shows, and saving is locked while the pre-publish panel is open and on posts that are already live or scheduled. Where the editor supportseditor.preSavePost, publishing with pre-publish checks turned off is refused too. - The Post Expiry box lists the required categories.
bpe_required_categoriesfilter.
Changed
- Bonsai → Post Expiry now has Overview and Settings tabs. Editors only see Overview.
BPE_Expiry::save()reads the nonce and date through newbox_submitted()andposted_timestamp()helpers, shared with the required check. Saving behaves the same.
Bonsai Post Expiry 1.1.0
Added
- Bonsai → Post Expiry screen in the shared Bonsai admin menu (bundled Bonsai Hub 1.0.2 in
lib/bonsai-hub/). It lists upcoming expiries (soonest first, overdue ones flagged) and the last 20 expired posts, and warns when the hourly check isn't scheduled or WP-Cron is disabled. Editors and Administrators can see it (edit_others_posts). - Overview link on the plugin's row on the Plugins screen.
- Updates from GitHub releases in wp-admin, via YahnisElsts/plugin-update-checker 5.7 (Composer,
vendor/committed). Sites check every 6 hours and install only thebonsai-post-expiry.ziprelease asset. OptionalBPE_GITHUB_TOKENconstant for a private repo. .github/workflows/release.ymlbuilds that zip and attaches it when a release is published. It fails if the tag doesn't match the plugin version.- Fixed Composer
autoloader-suffix(BonsaiPostExpiry), so the autoloader class can't clash with other Bonsai plugins that bundle the same updater. - Duplicate-install guard: a second active copy shows an admin notice instead of a fatal error.
- The hourly safety check is re-scheduled once after each update (
bpe_versionoption), because updates don't re-run the activation hook. - Plugin listed in the Bonsai Hub Plugins catalogue (hub 1.0.2).
Changed
- Code split from one file into
inc/class-bpe-expiry.php,inc/class-bpe-admin.phpandinc/class-bpe-updater.php. The main class is nowBPE_Expiry(wasBonsai_Post_Expiry). Meta keys, cron hooks,bpe_post_typesandbpe_post_expiredare unchanged, so existing expiries carry over. - The edit-screen box script moved from an inline
<script>toassets/admin.js(jQuery, delegated so it survives the block editor moving meta boxes). Inline styles moved toassets/admin.css. - Plugin header: added Plugin URI, Author URI, Update URI and License.