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.
@cogdog possible splot/plugin idea https://t.co/pL0HnuIO2L
— john johnston (@johnjohnston) April 19, 2019
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.
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().
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.
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;-)
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.
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.
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.