A plugin

Sometimes I click Publish and when I see the post realised I’ve made a mistake in the formatting (or I see typos which is more the case) and I have to click Edit to redo it. Hardly a torment but mildly annoying when it happens repeatedly. Now I know I can save a post as ‘Private’ and then view it but I can’t be bothered with all that public/private stuff here. So I wondered if I could write a wee line of code so I could preview it.
When you save a post then go back to re-edit it, this is what I see in the address bar:
http://www.romanticrobot.net/wp-admin/post.php?action=edit&post=1860
and I wanted to turn that into
http://www.romanticrobot.net/?p=1860
which would me I see the preview and you do not. Nice.
I have played around on and off for about a week trying to get this working but no way. It either just did not work or I got errors in the admin. Tonight I gave up trying to make sense of it and went to the brains that is #wordpress. And with the help of Xuff and Firas I now have a plugin. No, not the code I have frustrated myself with, but a plugin that was written by BigJibby over two months ago. We did get the code I was trying to work but as my next step was to convert it to a plugin, this saved me the work, me the frustration and others from having to answer a whole heap of questions. I give you the Preview Drafts Plugin from September. Works a treat :) Somehow it slipped under my radar. And yes I know this is a 1.6 feature but I’m not yet convinced that there is enough in there for me to upgrade – hence my wanting this.

One thought on “A plugin

  1. Pingback: Login - Red Alt

Leave a Reply

Your email address will not be published. Required fields are marked *