If you're a WordPress developer, chances are from time to time; you just want a…
As a publishing platform, WordPress offers a unique, out of the box solution for managing content. However, it doesn’t necessarily encourage collaboration with its platform. Post Forking hopes to fill that hole a little by offering ways to create multiple versions of posts that can be edited, compared and merged.
What’s It Do?
Post Forking gives authors the ability to create multiple “branches” of their post, basically different versions of a post that are stored together. Branches can easily be compared, and when changes are final, two branches can be merged back into the original post. Anyone who has used Git version control before should be familiar with this process. It also allows users that can’t normally edit posts create their own forks without giving them that ability.
This opens up new possibilities for your editorial workflow. For single authors, you can easily explore new ideas or a new direction with your post, and then trash it if it’s not working, or merge the changes and continue writing. WordPress sites with multiple authors can allow revisions to be done through the use of post forks, and then merged when they are approved. Or, you can limit it even more by letting writers create forks whenever they wish, without having to worry about them publishing something by accident. Basically, Post Forking allows you to bring the content creation process into WordPress, and combine it with the platforms already robust publishing capabilities.
How’s It Work?
When you install and activate the plugin, there will be a new section in your admin panel labeled Forks. Go to Forks -> Settings and check off which post types should having forking enabled, posts, pages, and media. The rest of Post Forking’s functionality lies in the post editor.
Forking a post will duplicate the post so that you can start working on an exact replica without affecting the original one. To fork a post, go to the All Posts list and hover over the post you wish to clone, then click the “fork” link. Your forked will automatically open in a new window.
From there, you can make any changes to this post that you wish. Remember, these changes will not affect the original post until you chose to merge the two. On the right side of the page, instead of your normal publish box, you will see some options that are unique to a post-branch. You can either “Compare,” “Save Fork,” or “Merge.”
“Save Fork” is similar to saving a draft. It will store the changes that you have made in that branch. The “Compare” button is very useful. When you click “Compare” you will be automatically brought to a screen which shows the content of the original post on the left side, and the content of your new forked post on the right. Any deletions will be highlighted in red, additions will be highlighted in blue.
The “Merge” button will automatically merge the changes you made into the original post. Most of the time, this will happen automatically, but if there is a conflict between the two, overlapping new text for instance, then you will be brought to the compare page. From there you can make the changes to the new post automatically to resolve the conflict, and then click the “Manually Merge Fork” button to save the post. That’s the basic workflow of Post Forking.
Branching is very similar to Forking, except it is also useful for outside authors. If you go to any existing post’s editor, you will see a new button on the top right labeled “Create New Branch.” If you click on this, then it will create a fork of the post and you can begin editing. Except that branch will be owned by you, not by the original post author. So let’s say “Jay” writes a post. If “Roger” creates a new branch of it, then that branch will be attributed to him. Other then that, the functionality is the same as Forking.
You can also switch to a branch at any time, by selecting that branch from the drop-down menu above the Create New Branch button. This will switch you to the fork editor and you can continue to make changes.
Here’s where it gets interesting. If a user has the ability to read posts, but can not edit them (the Contributor user role for instance), then Post Forking gives them the ability to create a branch without disturbing the original post. If any user hovers over a post, they will see a link to “Fork” it, even if they can’t edit the actual post. This is where collaboration comes in because this also applies to author users and posts that were not originated by them. So, let’s say Jay is an author and creates a post. “Roger” can then create a fork, make some changes, and push them back to Jay. Jay can then approve them and publish them if he likes, but Roger will not have the ability to publish. This can be very useful for WordPress sites with multiple authors.
If you go to Forks -> Forks you will see a list of all forks that been made from all posts. If you are looking for a specific version, or want to make edits to an existing fork.
There is a lot that can be done with this plugin if it fits into your workflow, and it can help authors suggest changes to one another while keeping everything organized. And that’s the general idea behind it.
Costs, Caveats, Etc.
Post Forking is completely free and fairly new. The plugin has a full documentation wiki and P2 blog for bug reports and feature requests. If you are having a specific problem, you should have luck on the support forums. The source code is also on GitHub if you are interested in its development. Right now, the plugin team is looking for new ideas and features to add so be sure to let them know.