Multisite Post Forker – The Jolly Brancher

I happened to see John Johnston’s tweet earlier today. Essentially the goal was to write a plugin in WordPress multisite that would let the user fork a post/page into their own site where they could then continue to edit etc.

I had been hassling with a few other projects and felt like a break so I decided to take a swing at making it. I knew I had some of the major concepts worked out as part of the Motherblog Plugin, I’d just need to tweak some things. I managed to get a working plugin together in an hour or so. I’m dabbling off and on with some details but it’s functional. It’s up on github. Demo video is below.

Comments on this post

  1. Cog.Dog said on April 19, 2019 at 5:20 pm

    Slick for an hour’s worth. I must have missed what the use case is for someone to fork their own post from one site to another.

    Questions…

    Shouldn’t the forked post be added to the new site with a status of draft?

    I like seeing the reference of where it was forked. What happens if you fork a forked post? Perhaps the plugin should store the fork history / reference in a post meta field, and append the fork info on hooking into the_content().

    • Tom Woodward said on April 19, 2019 at 6:15 pm

      I think the idea is the student forks from the instructor site to their own site/

      The draft idea does make sense and is easy enough to add.

      The custom field makes good sense if the idea is that forking keeps forking going. Each subsequent site would need to activate the plugin. I was mainly doing it to see if it’d trigger the trackback to make things easier to see/find.

  2. John said on April 21, 2019 at 3:02 am

    Alan, The use case I was thinking of was for primary pupils. I often give wee text files with some structure for my class e-portfolios postings.
    Tom, brilliant stuff thanks you.
    I think the draft is a very good idea.
    For my use a history of forks is not important.
    It also might be handy to be able to turn on toggling the Fork button on a per post basis. Also, and I am thinking of my situation, to be able to change the text of the message. Use this template, or some such. All would be gravy, I really appreciate this and will be proposing it for Glow Blogs. That might take a bit longer that creation;-)

    • Tom Woodward said on April 21, 2019 at 7:13 am

      I flipped it from a content filter to a shortcode. [fork] should do it now. It’s updated on github. I want to revisit a few things on the trackbacks. I’ll make it an option in the shortcode but probably not today.

  3. John said on April 23, 2019 at 1:06 am

    Hi Tom,
    I had a wee play with expanding the short code with some attributes and a meta box too in branches of a fork. https://github.com/troutcolor/jolly_brancher/
    Messy stuff so far but may be of interest.

    • Tom Woodward said on April 23, 2019 at 8:03 am

      Awesome. Nice additions. I have this in my back pocket now and think I’ll find someone who’ll use it. It’s just a matter of time.

Leave a Reply

Trackbacks and Pingbacks on this post

No trackbacks.

TrackBack URL