On my NFL football blog all users are allowed to make blog posts. New registrants are given contributor status. When users make a post it is reviewed by an editor, then the editor schedules the post to publish at a time fitting our blog schedule.
Multiple editors have asked me if they could make a comment on the article right after they edit the post and schedule it to be published, but before it is actually published.
By comments, I mean comments on the article content, not comments to the contributor about their writing style, grammar, spelling, etc. or comments that other editors can see in the backend. I use Peter’s Post Notes and Peter’s Collaboration E-mails to handle communication with contributors about these issues/situations.
What I need, example: A contributor writes an article about Peyton Manning signing with the Denver Broncos. The editor is notified at 10pm that the post has been submitted for review. He/she goes in to check the post for grammar, spelling, tags, proper category, etc. The editor makes all the necessary corrections and schedules the post to publish at 9am tomorrow. Now, the editor wants to leave his thoughts about Peyton Manning’s contract with the Broncos for the world to see. The problem, the post publishes at 9am tomorrow, but he is reading the post at 10pm today… and does not want to come back 11 hours later to leave a comment on a post he is reading right now.
This makes sense to allow the editor to comment before the post publishes, since the editor has already read the post, so I would like to make it easier for editors if possible, rather than the editor needing to come back once the post has published to make their comments.
I really have no preference as to whether the timestamp on the comment is the same as the post publish time or the time the comment was actually made, even if it was before the post was scheduled to publish.
I found a forum post that is two years old ( http://core.trac.wordpress.org/ticket/11810 ) discussing a vulnerability in WordPress that used to allow comments on unpublished posts, but I simply cannot find a way to allow Editors to leave comments on unpublished posts in WordPress 3.
It depends on who the comments are for, are they for the administrators and editors or are they also for the contributors?
I’ve setup a system, somewhat elaborate, which handles some of what you’re asking, however the easiest way to achieve something like this is by using custom fields.
In particular, a custom metabox with repeating fields which allows you to add multiple fields (for example textareas) for which editors can leave their comments.
Depending on how you have your blog structured, contributors may or may not be able to see those comments. Usually they will see them if they have access to the dashboard. If on the other hand they are contributing via the front end of your site then they wont see those comments unless you query your custom fields into your template.
Either way, you can also restrict the view of those fields to a certain user class.
I highly recommend using the WP Alchemy Metabox Class found HERE
It’s powerful, well documented and relatively easy to use with plenty of example metabox files that you can use right out the gate and to help you wrap your head around their usage.
UPDATE
Ok I’m just thinking aloud here but my thoughts on this are that you will still need to use a custom field from within the post-edit screen for which your editor can leave his/her comment however on post publish, you then hook into wp_comments and take the value of the custom field and have it inserted into comments.
However it might be just as easy to call the custom field value from within your theme file but within the section where you display your actual comments. Then in fact you could quite easily style the comments to make them standout in a unique fashion (being editorial comments).
But if you desperately don’t want to do that then you need to be thinking along the lines of… (conceptual code below)
Again this is just conceptual, I’ve never done something like this but it should get you thinking along the right path. If I get a moment I might even test it out! Although I am sure many others could chime in and seal this deal for you quite easily.
Through the thought process initiated by userabuser, more research and trial and error, I have come up with a solution.
I have added a custom meta field using Easy Content Types (simply because I have used this plugin for a while) and added the following code to my functions.php
References
Additional
The meta box for comments is only visible for editor status and above.
Being that an editor can choose whether to publish a post immediately, or schedule it to be published later, I added actions to save the comment on both instances.
I also automatically subscribed editors to new comments made on the post.
If you have suggestions to improve this method, please let me know!