A big part of learning by doing is getting things wrong. You're never going to get it right first time, every time and just have to accept that.
It's what prompted me to write that I needed a second WordPress installation to test against rather than keep breaking the blog.
But, as well as getting it wrong, we need to be willing to admit that we got it wrong.
And that's where I am at the moment.
The basic plugin is in and working, and hopefully a little bit more secure than it was, so I now I need to set priorities for the next steps.
The two main to-dos on my original list are:
- register the 'liked' and 'reply' custom fields so always available
- add a settings page
i think i was looking at the custom fields the wrong way as I haven't found a way to make an unpopulated entry be always available in the drop-down. It appears that items only exist in the custom fields drop-down if they are currently part of a key:value pair in the database.
As the plugin removes the target URL when the post is updated the options are no longer available.
I could be wrong. (Again.)
Custom field vs meta box
Off in search of another option I wondered about using meta boxes. Surprise, surprise, I was looking at them the wrong way.
I'm detecting a pattern here.
I initially thought that meta boxes were a separate, self contained entity and wouldn't play nice when posting from somewhere like WorkFlow.
But, a bit of research later, and it turns out that meta boxes are actually just a way of displaying the mechanism to add and store post metadata - a custom version of custom fields.
Creation of a metabox may require a little change to the base code but that'll be easy to manage and the next step in the process has essentially been decided for me.
So, no coding in this part, but there are advantages to being wrong.