WordPress Approval Gaps: 3 Risks in Publishing Workflows
Résumé
Pixel’s announcement explains three common points where WordPress publishing workflows can bypass approval, including approvals kept in separate tools and status flags that are not tied to the approved content. It highlights why tracking the exact approved version matters and how checks can prevent unreviewed edits, such as price or legal-line changes, from going live.
DEV Community
The three places a WordPress publishing process skips approval
The three places a WordPress publishing process skips approval (and the check that closes them) You approved the draft on Tuesday. It went live on Thursday with two sentences that were never in what you approved. Nobody lied, nobody broke permissions, and no log records anything unusual. This is the most common failure I see in client publishing workflows, and it is not a permissions problem. It is a record-keeping problem: the site stores the decision ("approved") but not the thing that was decided about. Here is where it breaks, in order of how often it happens. 1. The approval lives in a different tool than the publish button The client says "looks good" in an email. The copy is signed off in a Google Doc comment. The Figma shows final. Then the WordPress draft gets edited once more — a price, a date, a legal line — and published. The CMS has no idea an approval ever happened, so nothing is violated from its point of view. Approval existed as a conversation, not as a constraint on the publish action. This is the agency-handoff gap: the person who approved and the person who presses Publish are not the same person, and nothing between them enforces anything. Symptom to look for: ask "show me the version that was approved" and watch how long it takes to answer. If the answer is a Slack scroll, the approval is not real. 2. The approval was about a version, not about the content Most "approval" plugins and custom statuses store a boolean-ish status: approved = true. That flag says someone pressed a button at some moment. It says nothing about whether the text currently in the row is the text that was on screen at that moment. So this sequence is legal everywhere and wrong everywhere: Editor approves. Someone fixes "just a typo" — except the typo was the price. The status still reads approved. It publishes. The flag is honest about the past and silent about the present. That is the actual defect. 3. Scheduled posts and bulk edits go around the front door Approval checks are usually wired to the "Publish" button in the editor. They are not wired to: a post already scheduled, whose content is edited afterwards; bulk edit / quick edit; a REST API write from a form plugin, a Zapier-style automation, or a CSV importer; a role that can publish whose capability was granted for a different reason. If the check lives in the UI, it does not exist. It has to live where every write passes through. What an approval has to record to be worth anything Three things, or it is decoration: Who approved. When. A hash of the exact text that was approved. With the third one, "has the content changed since it was approved?" becomes a comparison instead of an opinion. On WordPress, that comparison belongs in wp_insert_post_data — the filter every insert and update passes through, including REST, bulk edit and scheduled transitions: add_filter( 'wp_insert_post_data', function ( $data, $postarr ) {
$id = (int) ( $postarr['ID'] ?? 0 );
if ( ! $id ) {
return $data;
}
$approved = get_post_meta( $id, '_approved_hash', true );
if ( ! $approved ) {
return $data; // no approval recorded: nothing to validate
}
$current = hash( 'sha256', $data['post_title'] . "\n" . $data['post_content'] );
if ( ! hash_equals( $approved, $current ) ) {
// Block the write, or downgrade the status back to draft.
$data['post_status'] = 'draft';
}
return $data;
}, 10, 2 );
hash_equals rather than === because it is the constant-time comparison for this job. Downgrading to draft rather than throwing an error is deliberate: it fails closed without destroying the editor's work, and it leaves the block visible in the post list. The moment you have that, the failure from section 2 is impossible: an edit after approval invalidates the approval by definition, because the hash no longer matches. Re-approving re-records the hash. What this does not do Worth stating plainly, because the honest version is more useful th...

Powered by Readybot.io