Skip to content

Releases: Automattic/staged-edits

v0.3.0-alpha.2: Cleaner WP-CLI help

Pre-release

Choose a tag to compare

@github-actions github-actions released this 23 Oct 19:49
288634b

A maintenance release. The plugin behaves exactly as 0.3.0-alpha.1 did.

What changed

  • WP-CLI help reads cleanly. wp help staged-edits printed an internal reference number after publish, run-due, schedule and unschedule. Each now reads as a plain sentence.
  • Source comments, tests and the README drop the same internal references. No code path changes.

Upgrading from 0.3.0-alpha.1

Replace the plugin with staged-edits-v0.3.0-alpha.2.zip. The folder and main file keep their names, so WordPress updates it in place. Nothing is migrated and no settings change.

Coming from 0.2.0-alpha.1 (Save without Publish)? Follow the 0.3.0-alpha.1 upgrade steps first.

Known issues

Unchanged from 0.3.0-alpha.1:

  • Custom fields, ACF included, are not staged. A change to one on a staged copy is not published. Edit custom fields on the published post.
  • Multisite super admins do not stage, because WordPress grants them every capability. Test as an ordinary admin or editor, or use add_filter( 'staged_edits_can_publish_directly', '__return_false' );.
  • Scheduled publishes run on WP-Cron, so on a quiet site "9:00" means some time after 9:00.

See docs/alpha-testers.md for the full guide.

Requirements

WordPress 6.8 or later and PHP 8.2 or later. CI covers PHP 8.2 to 8.5 against WordPress 6.9 and the latest release, with 461 PHPUnit tests and the Playwright suite.

v0.3.0-alpha.1: Save without Publish becomes Staged Edits

Choose a tag to compare

@github-actions github-actions released this 13 Oct 20:29
69a182b

Save without Publish is now Staged Edits. This release is the rename and nothing else: the plugin behaves exactly as 0.2.0-alpha.1 did, under new names.

Upgrading from 0.2.0-alpha.1

The folder and main file have new names, so WordPress sees this as a different plugin and will not update the old one in place:

  1. Deactivate and delete Save without Publish. Deleting it removes no data.
  2. Install staged-edits-v0.3.0-alpha.1.zip and activate Staged Edits.

Do not run both at once.

Your staged copies come with you. On the first request after activating, the plugin renames everything it stored:

  • the swpub_staged post status becomes staged_edits_staged
  • _swpub_* post meta becomes _staged_edits_*
  • scheduled publishes keep their times
  • swpub_publish_directly_* capabilities you granted or denied, on roles or users, are carried over

There is no downgrade. 0.2.0-alpha.1 cannot read data this release has renamed. Back up first if you might need to go back.

What you need to change by hand

Anything you wrote against the old names stops working. There are no aliases.

Was Is now
swpub_* actions and filters staged_edits_*
swpub_publish_directly_* capabilities in your own code staged_edits_publish_directly_*
VIP_SAVE_WITHOUT_PUBLISH_CONFIG VIP_STAGED_EDITS_CONFIG
wp swpub … wp staged-edits …
REST namespace swpub/v1 staged-edits/v1
swpub field on REST responses staged_edits
X-SWPub-Meta-Dropped header X-Staged-Edits-Meta-Dropped
SaveWithoutPublish\ PHP namespace StagedEdits\
save-without-publish text domain staged-edits

A site that still defines the old config constant falls back to the default drift policy, never.

Known issues

Unchanged from 0.2.0-alpha.1:

  • Custom fields, ACF included, are not staged. A change to one on a staged copy is not published. Edit custom fields on the published post (VIPPROD-1356).
  • Multisite super admins do not stage, because WordPress grants them every capability. Test as an ordinary admin or editor, or use add_filter( 'staged_edits_can_publish_directly', '__return_false' );.
  • Scheduled publishes run on WP-Cron, so on a quiet site "9:00" means some time after 9:00.

See docs/alpha-testers.md for the full guide.

Requirements

WordPress 6.8 or later and PHP 8.2 or later. CI covers PHP 8.2 to 8.5 against WordPress 6.9 and the latest release, with 461 PHPUnit and 78 Playwright tests.

v0.2.0-alpha.1: A draft for a published post

Choose a tag to compare

@github-actions github-actions released this 02 Oct 23:07
7fbf171

Log entry, release 0.2.0-alpha.1.

I'm pretty much stuck with WordPress.

That's my considered opinion. In WordPress, the moment you press Update on a published post, your change is live. There is no draft of a published post. One typo and the whole internet gets to watch you fix it.

So I built a draft for a published post. This is the first tagged release, and the first one the VIP Integration Center can install.

What it does

  • Stage changes. On a published post, the Update button becomes Stage changes. Your edit to the title, content or excerpt goes into a private staged copy. Readers keep seeing what they saw before. Nothing leaks.
  • Review. You review the staged words against the live ones in WordPress's own revisions screen: the in-editor view on 7.0 and later, the classic compare screen before that. I did not build a diff tool. Core already has one, and I'm not an idiot.
  • Publish changes. One click and the staged words replace the live ones. It's the same post, with the same ID, URL, publish date and comments. The outgoing words are saved as a revision first, so rolling back is the one click it always was.
  • Publish at a set time. Pick a date and time and walk away. WP-Cron publishes it as the person who scheduled it, through exactly the same step their click would have run. Operations people can use wp swpub run-due.
  • Drift protection. If the live post changed after you staged, publishing stops and shows you what changed. You can't overwrite something you've never seen. A scheduled run that hits drift stops, keeps every staged word, and marks itself Schedule stopped, because the alternative is a robot overwriting a human at 3 a.m.

New since the last thing nobody tagged

VIP_SAVE_WITHOUT_PUBLISH_CONFIG, with one setting, scheduled_publish_overrides_drift:

Value A scheduled publish meets a live post that changed first, and…
never (default) stops. Same as always.
non_content publishes past a change to things the merge never writes (terms, featured image, slug). It still stops if the words changed.
always publishes the staged words over anything. You asked for it.

This setting only supplies the default for the existing swpub_scheduled_publish_overrides_drift filter. Your own filter still has the last word, in both directions. An unset, malformed or unrecognised value means never, and none of them can stop the plugin from loading. Publishing by hand never reads it.

The Integration Center conformance checker reports conformant: 8 pass, 0 fail, and 1 n/a, because there's no telemetry to check. That's a CI job now, and locally it's npm run validate:integration.

Known issues (read these before you file a bug)

  • Custom fields, ACF included, are not staged. Worse, a change to one on a staged copy isn't refused. It just doesn't get published. Edit custom fields on the published post. This is next on the list (VIPPROD-1356).
  • Multisite super admins don't stage. WordPress gives them every capability, including the one that skips staging. Test as an ordinary admin or editor too, or use add_filter( 'swpub_can_publish_directly', '__return_false' );.
  • WP-Cron is not a stopwatch. On a quiet site with traffic-driven cron, "9:00" means "sometime after 9:00".

See docs/alpha-testers.md for the full field guide.

Requirements

WordPress 6.8 or later and PHP 8.2 or later. CI covers PHP 8.2 to 8.5 against WP 6.9 and the latest release, with 457 PHPUnit and 78 Playwright tests.

Install save-without-publish-v0.2.0-alpha.1.zip from this release.

It's an alpha, so things will break. When one does, tell us what you clicked, and we'll science the [expletive deleted] out of it.