Code Monkey home page Code Monkey logo

post-forking's Introduction

Post Forking

Build Status

WordPress Post Forking allows users to "fork" or create an alternate version of content to foster a more collaborative approach to WordPress content curation.

Description

WordPress Post Forking allows users to "fork" or create an alternate version of content to foster a more collaborative approach to WordPress content curation. This can be used, for example, to allow external users (such as visitors to your site) or internal users (such as other authors) with the ability to submit proposed revisions. It can even be used on smaller or single-author sites to enable post authors to edit published posts without their changes appearing immediately. If you're familiar with Git, or other decentralized version control systems, you're already familiar with WordPress post forking.

How might you use it?

  • Allowing users without edit or publish post capabilities to edit and submit changes to content (similar to GitHub’s pull request system)
  • Collaborative editing (by resolving two users’ conflicted saves – Wired’s example)
  • Saving draft changes of already-published content
  • Scheduling pending changes to already-published content

How does it work?

When a user without the edit_post capability attempts to edit a given post, WordPress will automatically create a "fork" or alternate version of the post which they can freely edit. The edit screen will look just like the standard post editing interface that they are used to. When they're done, they simply click "submit for review." At this point, the fork goes into the standard WordPress moderation queue (just like any time an author without the publish_post capability submits a post), where an editor can review, and potentially approve the changes for publishing. If the changes can be automatically merged, the original post will be updated, otherwise, the editor will be presented with the ability to resolve the conflicting changes. All this is done using WordPress's built-in custom post type, revision, and diff functionality, so it should look familiar to most WordPress users.

Concepts

WordPress Post Forking introduces many of Git's well-established conventions to the WordPress world, and as a result, uses a unique vocabulary to describe what it does:

  • Post - Any WordPress post that uses the post_content field, including posts, pages, and custom post types
  • Fork - Clone of a post intended for editing without disturbing the parent post
  • Branch - Parallel versions of the same parent post, owned by the post author
  • Merge - To push a fork's changes back into its parent post
  • Conflict - When a post is forked if a given line is changed on the fork, and that same line is subsequently edited on the parent post prior to the merge, the post cannot be automatically merged, and the conflict is presented to the merger to resolve

Why this plugin?

Project Status

This version constitutes an initial release designed to showcase the plugin's core functionality and is intended to be improved upon with additional features and refinements as the project evolves. Please consider contributing your time to help improve the project.

More Information

For more information, or to contribute to this documentation, please visit the Post Forking project wiki.

[Photo courtesy babomike]

Installation

Automatic Install

  1. Login to your WordPress site as an Administrator, or if you haven't already, complete the famous WordPress Five Minute Install
  2. Navigate to Plugins->Add New from the menu on the left
  3. Search for Post Forking
  4. Click "Install"
  5. Click "Activate Now"

Manual Install

  1. Download the plugin from the link in the top left corner
  2. Unzip the file, and upload the resulting "post-forking" folder to your "/wp-content/plugins directory" as "/wp-content/plugins/post-forking"
  3. Log into your WordPress install as an administrator, and navigate to the plugins screen from the left-hand menu
  4. Activate Post Forking

Frequently Asked Questions

Please see (and feel free to contribute to) the Frequently Asked Questions Wiki.

Screenshots

Coming soon...

Changelog

0.1

  • Initial release

Upgrade Notice

0.1

  • Initial Release

Frequently Asked Questions

Please see (and feel free to contribute to) the Frequently Asked Questions Wiki.

How To Contribute

Post Forking is an open source project and is supported by the efforts of an entire community. We'd love for you to get involved. Whatever your level of skill or however much time you can give, your contribution is greatly appreciated.

Roadmap

Future Features (Maybe):

Under The Hood

** Warning: geek content! **

Forking a post creates a copy of the most recent version of the post as a "fork" custom post type. Certain fields (e.g., post_content, post_title) are copied over to the new fork. The plugin also stores the revision ID for the revision prior to when the fork was created (see includes/revisions.php for more information as to why we store the previous revision).

The fork post type has its own capabilities, allowing a user without the ability to edit or publish on the parent post to edit a fork. Once changes have been made, assuming the user does not have the publish_fork capability, the user would submit the fork for review (similar to submitting a Pull Request in GitHub parlance) using the normal WordPress moderation system.

Publishing a fork (either by the fork author, if they have the capability, or my an editor) triggers the merge itself. The post content of the fork undergoes a three way merge with the base revision and current version of the parent post.

A fork can have three post statuses:

  1. Draft - The fork is being edited
  2. Pending - The fork has been submitted for publication
  3. Published - The fork has been merged

Note: No user should have the edit_published_fork capability. Once published, the fork post_type simply exists to provide a record of the change and allow the author page, to theoretically list contributions by author.

Upgrade Notice

0.1

  • Initial Release

Where To Get Support Or Report An Issue

There are various resources available, depending on the type of help you're looking for:

  • For getting started and general documentation, please browse, and feel free to contribute to the project wiki.
  • For support questions ("How do I", "I can't seem to", etc.) please search and if not already answered, open a thread in the Support Forums.
  • For technical issues (e.g., to submit a bug or feature request) please search and if not already filed, open an issue on GitHub.
  • For implementation, and all general questions ("Is it possible to..", "Has anyone..."), please search, and if not already answered, post a topic to the general discussion list serve
  • For general discussion about the project and planning, please see the P2

post-forking's People

Contributors

aaronjorbin avatar benbalter avatar bueltge avatar danielbachhuber avatar fxbenard avatar japh avatar joncave avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.