Changeset 3517 for trunk/wp-includes/comment-functions.php
- Timestamp:
- 02/12/2006 07:53:23 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-functions.php
r3442 r3517 42 42 $commentdata['comment_date'] = current_time('mysql'); 43 43 $commentdata['comment_date_gmt'] = current_time('mysql', 1); 44 44 45 45 46 46 $commentdata = wp_filter_comment($commentdata); … … 231 231 if ( !isset($comment_count_cache[$post_id]) ) 232 232 $comment_count_cache[$id] = $wpdb->get_var("SELECT comment_count FROM $wpdb->posts WHERE ID = '$post_id'"); 233 233 234 234 return apply_filters('get_comments_number', $comment_count_cache[$post_id]); 235 235 } … … 278 278 global $id, $wpcommentspopupfile, $wpcommentsjavascript, $post, $wpdb; 279 279 global $comment_count_cache; 280 280 281 281 if (! is_single() && ! is_page()) { 282 282 if ( !isset($comment_count_cache[$id]) ) 283 283 $comment_count_cache[$id] = $wpdb->get_var("SELECT COUNT(comment_ID) FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1';"); 284 284 285 285 $number = $comment_count_cache[$id]; 286 286 287 287 if (0 == $number && 'closed' == $post->comment_status && 'closed' == $post->ping_status) { 288 288 echo $none; … … 345 345 function get_comment_author_email() { 346 346 global $comment; 347 return apply_filters('get_comment_author_email', $comment->comment_author_email); 347 return apply_filters('get_comment_author_email', $comment->comment_author_email); 348 348 } 349 349 … … 617 617 debug_fwrite($log, 'Post contents:'); 618 618 debug_fwrite($log, $content."\n"); 619 619 620 620 // Step 2. 621 621 // Walking thru the links array … … 659 659 // when set to true, this outputs debug messages by itself 660 660 $client->debug = false; 661 661 662 662 if ( $client->query('pingback.ping', $pagelinkedfrom, $pagelinkedto ) ) 663 663 add_ping( $post_ID, $pagelinkedto ); … … 770 770 if ( 'attachment' == $post->post_status ) 771 771 return true; 772 } 772 } 773 773 return false; 774 774 } … … 796 796 if ($wpdb->query($query)) { 797 797 do_action('wp_set_comment_status', $comment_id, $comment_status); 798 798 799 799 $comment = get_comment($comment_id); 800 800 $comment_post_ID = $comment->comment_post_ID; … … 810 810 function wp_get_comment_status($comment_id) { 811 811 global $wpdb; 812 812 813 813 $result = $wpdb->get_var("SELECT comment_approved FROM $wpdb->comments WHERE comment_ID='$comment_id' LIMIT 1"); 814 814 if ($result == NULL) { … … 846 846 // spam words don't break things: 847 847 $word = preg_quote($word, '#'); 848 848 849 849 $pattern = "#$word#i"; 850 850 if ( preg_match($pattern, $author) ) return false;
Note: See TracChangeset
for help on using the changeset viewer.