In Progress: Scheduling updates to published posts on WordPress.org

The Learn WordPress site has a lot of content (especially in lesson plans) that is specific to a particular version of WordPress. When a new version of WordPress is released, that content has to be reviewed and updated, which requires a lot of effort from members of the Training Team. Right now, these updates can only be made after the new version is released, because updates to post content happen immediately (only unpublished posts can be scheduled to publish on a future date). The Docs team that maintains HelpHub and DevHub faces similar challenges.

The MetaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. team is attempting to improve this situation by making it possible for contributors to save a change to an already-published post that will go live at a later date. This will be a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party installed on the WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ network that can be enabled on any network site.

The basic scope of the plugin:

  • From the blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. editor, make changes to an already-published post and schedule those changes to go live at a later date.
  • In the block editor UIUI UI is an acronym for User Interface - the layout of the page the user interacts with. Think ‘how are they doing that’ and less about what they are doing. as well as other admin screens, indicate when a post has a scheduled update.
  • View a list of all scheduled updates.
  • Edit scheduled updates, including the content and the future publish date.
  • Compare scheduled update content to the current published content.
  • This functionality should be available for all post types that support revisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision..

Under the hood, the plugin will use CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.’s built-in revision system. A scheduled update will be saved as a revision post type with a future post status. When the update is due to be “published”, it gets converted to a normal post revision with an inherit post status and then that revision is “restored”.

Here’s a (very rough) screencast of the basic workflow:

The code for the plugin is currently in this GitHub repo.

FAQ

Aren’t there plugins out there already that do this?

There are a couple, but they are either inadequate for our needs or they add a bunch of extra stuff that we don’t need.

What about suggested updates, that don’t necessarily have a future publish date, but should be reviewed by a content editor before being approved and incorporated into an already-published post?

This is another feature that is often requested. While the same underlying revision system could be used for suggested updates as well, the UI flows are more complicated, so the current focus is just on scheduled updates.

Also, there is a fundamental limitation of how revisions are created and stored, in that each revision contains the entire content of a post. So if two people suggest revisions for a particular post at the same time, whichever suggestion gets approved first would be overwritten by the second suggestion. This would probably be a good topic for a separate post.

Is this something that belongs in WordPress Core?

If Core leadership thinks that this feature would benefit 80% of WordPress users, then sure! The plugin will definitely be built to work gracefully with Core and the block editor.  If this were prioritized for merge, Core’s revisions system would need to be updated to be a bit more flexible, and the block editor UI would need some changes to become more customizable.

Got other questions? Please share them in the comments!

#revisions-extended