# Last night I had the idea that I could show post revisions for the garden pages on the front end (yes, this is the kind of thing that keeps me awake at night) so as to keep track of changes. Definitely one of those "because I can" things.
Using the function wp_get_post_revisions() I can pull them out and use a little logic to get the previous version (the last one that doesn't match the current saved content.) WordPress then has a built in text comparison function wp_text_diff which displays the changes in the nice table you see in wp_admin when checking revisions:
I'll probably just add a toggle to show/hide the table. I don't know whether this is something I'll ever use or need, maybe if I accidentally save something incorrectly.
# Something I've thought about a lot over the years, but never been able to commit to, is journalling.
I've tried paper and digital, app and web, morning pages and daily gratitude logs, but nothing has stuck for an extended period. I don't know why.
A couple of years back I went to the trouble of creating a private journalling plugin for WordPress (well, it only created a custom post type) but removed it, unused.
I don't even blog daily.
A couple of recent posts got me reconsidering. In "A place to write" Seth Godin stated:
"a huge advantage of having a daily blog is that the software is always open, waiting for you to write something"
CJ Chilvers mentioned that his sole constraint for journalling was to "write something, anything, every day" - my exact words about the #Write365 project.
In the past I have felt that "writing in multiple places reduces the focus I have on each" even if those places were reserved for completely different purposes.
Recently, however, I've been negotiating the blog and the garden reasonably well so, armed with the insights from Seth and CJ, I have decided to give journalling another go.
I have gone back to my plugin but, this time, added a simple interface for posting journal entries based on the existing front end forms I've been using on the blog.
Maybe it never stuck because I didn't have all the pieces in place. Now they are and it can't get much simpler. Here's hoping that will carry me through.
# "We cannot look down upon [them] if our obvious is their oblivious."
Quite a profound quote from 6 years ago me.
# This morning's foray into post revisions was a typical example of how I work: I think of something, have no idea of whether it is possible, then set out to make it happen.
I had no idea about wp_get_post_revisions or wp_text_diff but found them while doing some judicious searching. I scramble around, learning as I go, documenting the journey as a way to remember it.
But, I suppose most people are like that, our ideas are exciting because they are new, unknown quantities, and the sense of achievement is all the greater.
@colinwalker there's that beautiful lucid time where all ideas start to flow isn't there?...i'm the same with melodies but i'm too tired to reach for the recorder at the side of the bed and i can never remember them in the morn : )
# Last night I had the idea that I could show post revisions for the garden pages on the front end (yes, this is the kind of thing that keeps me awake at night) so as to keep track of changes. Definitely one of those "because I can" things. Using the function
wp_get_post_revisions()
I can pull them out and use a little logic to get the previous version (the last one that doesn't match the current saved content.) WordPress then has a built in text comparison functionwp_text_diff
which displays the changes in the nice table you see in wp_admin when checking revisions:I'll probably just add a toggle to show/hide the table. I don't know whether this is something I'll ever use or need, maybe if I accidentally save something incorrectly. # Something I've thought about a lot over the years, but never been able to commit to, is journalling. I've tried paper and digital, app and web, morning pages and daily gratitude logs, but nothing has stuck for an extended period. I don't know why. A couple of years back I went to the trouble of creating a private journalling plugin for WordPress (well, it only created a custom post type) but removed it, unused. I don't even blog daily. A couple of recent posts got me reconsidering. In "A place to write" Seth Godin stated:
CJ Chilvers mentioned that his sole constraint for journalling was to "write something, anything, every day" - my exact words about the #Write365 project. In the past I have felt that "writing in multiple places reduces the focus I have on each" even if those places were reserved for completely different purposes. Recently, however, I've been negotiating the blog and the garden reasonably well so, armed with the insights from Seth and CJ, I have decided to give journalling another go. I have gone back to my plugin but, this time, added a simple interface for posting journal entries based on the existing front end forms I've been using on the blog. Maybe it never stuck because I didn't have all the pieces in place. Now they are and it can't get much simpler. Here's hoping that will carry me through. # "We cannot look down upon [them] if our obvious is their oblivious." Quite a profound quote from 6 years ago me. # This morning's foray into post revisions was a typical example of how I work: I think of something, have no idea of whether it is possible, then set out to make it happen. I had no idea about
wp_get_post_revisions
orwp_text_diff
but found them while doing some judicious searching. I scramble around, learning as I go, documenting the journey as a way to remember it. But, I suppose most people are like that, our ideas are exciting because they are new, unknown quantities, and the sense of achievement is all the greater.@colinwalker there's that beautiful lucid time where all ideas start to flow isn't there?...i'm the same with melodies but i'm too tired to reach for the recorder at the side of the bed and i can never remember them in the morn : )
I just had to make a couple of notes or knew I wouldn't sleep.