WordPress is built to cater to the single user running a personal blog up to the global company running an entire website. In the big cases such as the latter, some controls and processes need to be in place to restrict what users can do and to assure that certain events take place in the correct order. Collectively, we'll call these controls and processes a workflow and in this article we'll discuss using WordPress to put such a workflow in place.
Wikipedia defines a workflow as:
This definition can be trimmed and refined a bit to better suit its application to WordPress, yielding:
We will refer back to this definition repeatedly throughout this lesson as you learn how to setup a workflow on your own WordPress installation.
In our example workflow, we have two users: Charlie and Edward. Edward runs a website for Cello enthusiasts, for which Charlie occasionally writes articles. Despite Charlie's immense knowledge of Cello technique, he's not the best writer or speller, so he doesn't have permission to publish the article himself. Whenever he writes an article for Edward, there's usually a lengthy back-and-forth process to perfect the article for publishing.
This process (the workflow!) consists of Charlie writing/correcting his article and sending it to Edward, perhaps with comments detailing what he changed. Edward receives these changes and the updated article and takes one of a number of steps. He could fix the writing/spelling errors directly in the article or just send it back with a note telling Charlie to run it through a spell checker. It could also be that the article is perfect and ready for publishing, in which case Edward would publish the article.
The graphic below illustrates this workflow.
explain a hypothetical situation with contributor editor. A picture such as this one might be useful to illustrate how the workflow might work.
The only setup needed for the rest of this lesson is having the proper users. Building on the example workflow, we will create two users: charlie and edward. Your usernames will vary of course, but keep these two in mind as we go through the lesson. To add the users, you'll need to go to the Authors and Users SubPanel.
Charlie, the guy who should only be able to write articles and submit them for review, should be added as a 'Contributor' user. Edward, the one in charge of the content of the website, should be added as a 'Editor user. After adding these two users, your Users screen should look something like the one in the image.
With these two users, you can continue on to Section 3 and live a happy life with a perfect workflow for your posts. However, if you would also like to establish a workflow for your pages, then you'll have to do a bit of a extra work described in the next section.
We'll not look at three ways you can implement a workflow in your WordPress installation. In the first method, only the post is sent back and forth between Charlie and Edward. In the second method, Charlie and Edward are able to exchange messages in a roundabout way. The final method utilizes a plugin to allow Charlie and Edward to exchange information and notify each other when something happens with regard to the post.
In this example, Charlie (a contributor) writes a small post and Edward (the editor) approves it for publication. There's none of the back-and-forth of the workflow, but we do demonstrate that Charlie isn't able to publish anything himself.
An example showing some passing of information back and forth between the contributor and the editor using custom fields or messages embedded in the body of the post.
Discuss a plugin that takes advantage of the new state change actions to implement a workflow.
You can still sometimes see WordPress' roots as a blogging platform, even as it strives to be a CMS. One of those places is the default capabilities for the Author and Contributor roles. To examine these capabilities and get your workflow working for pages, you'll need the role manager plugin.
What we'll accomplish in this section is making the post and page capabilities for the Author and Contributor roles the same. Follow the following steps to get your capabilities looking like the ones in the images.
You'll notice that now all of the post capabilities have been mirrored as page capabilities too.
Show screenshots from role-manager