Since drafts are not shown publicly… it just doesn’t make sense.
Thread Starter
mannex
(@mannex)
As I said, for multi-author blogs it would be good. All authors can see all drafts. Clicking “View” from Edit posts is the best way to read another mans post. Once there, submitting a comment seems logical.
it would be good but does it make sense to make such an effort to go into source code?
Why don’t you use a category e.g. ‘draft’ which is not shown on the main page, with password protected posts?
You share the password with other authors and when the post is ready to really-publish remove the password and change the category.
Thread Starter
mannex
(@mannex)
that would be one solution, but for the end user it just seems to be to much hazzle…
I was able to do this by making the following change to wp-comments-post.php
if ( empty($status->comment_status) ) {
do_action('comment_id_not_found', $comment_post_ID);
exit;
} elseif ( 'closed' == $status->comment_status ) {
do_action('comment_closed', $comment_post_ID);
wp_die( __('Sorry, comments are closed for this item.') );
// } elseif ( in_array($status->post_status, array('draft', 'pending') ) ) {
// do_action('comment_on_draft', $comment_post_ID);
// exit;
}
Does that make sense?
Thread Starter
mannex
(@mannex)
Thanks, I will try it right away!
Thread Starter
mannex
(@mannex)
The comments get saved in the database but are not shown on the post or elsewere…
(@mannex)
16 years, 11 months ago
Hello,
I don’t know why comments are not allowed on drafts, but for multi-author blogs it would be great to be able to do it. I’ve tried to edit wp-comments-post.php (http://trac.wordpress.org/browser/branches/1.5/wp-comments-post.php?rev=2842) but havn’t managed to get it working.
Any ideas?