Status transitions

Restrict who can publish in WordPress: writers submit, editors decide

WordPress roles already say who can edit. Status transitions apply that to the moves that matter: review, schedule, publish and unpublish.

By Christopher Ross. Last updated .

Rules

A clear default that matches how desks work

Out of the box, anyone who can edit a post can send a draft to pending review, pull it back to draft, or trash unpublished work. Publishing, scheduling, making private and unpublishing are for editors and administrators.

  • Writers keep their flow: draft, then pending review
  • Editors publish, schedule and unpublish
  • Rules apply to posts and pages by default, and you can extend them to other post types
Draftto Pending review, allowed for Pending review Anyone who can edit the post
Draftto Published, allowed for Published Editors and administrators
Pending reviewto Scheduled, allowed for Scheduled Editors and administrators
Scheduledto Draft, allowed for Draft Editors and administrators
Publishedto Draft, allowed for Draft Editors and administrators only

Clarity

People see what they can do

The block editor stops offering Publish to a role the rules will refuse, so nobody clicks a button that is going to fail. If a blocked move gets through another way, a REST save returns a 403 and the classic editor shows a notice on the next screen.

  • No silent reverts, no mystery errors
  • Authors are offered Submit for Review instead of a Publish button that would fail, and they can still bin their own unpublished drafts
  • Clear wording: your role cannot move this post from one status to another, ask an editor

Without a plugin

What WordPress does on its own

WordPress already separates roles. A Contributor can write and submit a post for review but cannot publish it. An Author can publish their own posts. An Editor can publish anyone's. What core does not give you is one rule set for the moves in between, such as who may schedule, make private or unpublish, applied the same way in the editor, over REST and in the classic editor.

  • Editloft leaves the roles alone and adds the rules on top
  • Turn the module off and WordPress behaves exactly as it did before

Customise

Change who can publish with one filter

The rules are a plain array, so changing them is a few lines in a small plugin or your theme's functions file. This example also lets the Author role publish a draft:

add_filter( 'editloft_status_transition_graph', function ( $graph ) {
	$graph['draft']['publish']['roles'][] = 'author';
	return $graph;
} );
  • Return an empty array to turn enforcement off
  • Each key is a from-status, then a to-status, then the roles allowed to make that move

Flexibility

Yours to change, and safe by default

Different team, different rules. One filter, editloft_status_transition_graph, lets you reshape the whole graph. A status that is not in the graph is not gated, so a status added by another plugin never locks anyone out.

  • WP-CLI and scheduled publishes are never blocked
  • Every change that goes through is recorded in the audit trail

Questions

Status transitions FAQ

How do I stop authors and contributors publishing posts in WordPress?

WordPress lets an Author publish their own posts, and a Contributor can only submit for review. With Editloft's status transitions on, only editors and administrators can publish, schedule, make private or unpublish. Everyone else can send a draft to pending review, and you can change the roles with a filter.

Who can publish by default?

Editors and administrators. Writers can move a draft to pending review and back, and can trash their own unpublished work.

What happens when someone is blocked?

In the block editor the Publish button is not offered to roles the rules would refuse, and a blocked REST save returns a clear 403. In the classic editor a notice explains that their role cannot make that move and to ask an editor.

Are WP-CLI and scheduled publishes blocked?

Never. There is no editor to route them through, so they are always allowed, and they are still written to the audit trail.

How do I change the rules?

Filter editloft_status_transition_graph. Add statuses, change which roles may make a move, or return an empty array to turn enforcement off.

Free, open source, GPLv2

Try Editloft on a staging copy of your site

It is free, it takes a minute to install, and you can switch each module off again from one settings screen.