Changeset 2580 for trunk/wp-comments-post.php
- Timestamp:
- 05/03/2005 07:31:29 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-comments-post.php
r2558 r2580 4 4 $comment_post_ID = (int) $_POST['comment_post_ID']; 5 5 6 $ post_status = $wpdb->get_var("SELECTcomment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'");6 $status = $wpdb->get_row("SELECT post_status, comment_status FROM $wpdb->posts WHERE ID = '$comment_post_ID'"); 7 7 8 if ( empty($ post_status) ) {8 if ( empty($status->comment_status) ) { 9 9 do_action('comment_id_not_found', $comment_post_ID); 10 10 exit; 11 } elseif ( 'closed' == $ post_status ) {11 } elseif ( 'closed' == $status->comment_status ) { 12 12 do_action('comment_closed', $comment_post_ID); 13 13 die( __('Sorry, comments are closed for this item.') ); 14 } elseif ( 'draft' == $status->post_status ) { 15 do_action('comment_on_draft', $comment_post_ID); 16 exit; 14 17 } 15 18
Note: See TracChangeset
for help on using the changeset viewer.