Changeset 3031 for trunk/wp-includes/comment-functions.php
- Timestamp:
- 11/10/2005 11:31:58 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment-functions.php
r2986 r3031 35 35 36 36 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 37 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 38 37 39 $commentdata['comment_author_IP'] = $_SERVER['REMOTE_ADDR']; 38 $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; 39 $commentdata['comment_date'] = current_time('mysql'); 40 $commentdata['comment_agent'] = $_SERVER['HTTP_USER_AGENT']; 41 42 $commentdata['comment_date'] = current_time('mysql'); 40 43 $commentdata['comment_date_gmt'] = current_time('mysql', 1); 44 41 45 42 46 $commentdata = wp_filter_comment($commentdata); … … 51 55 if ( '0' == $commentdata['comment_approved'] ) 52 56 wp_notify_moderator($comment_ID); 53 54 if ( get_settings('comments_notify') && $commentdata['comment_approved'] ) 57 58 $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment 59 60 if ( get_settings('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ID'] ) 55 61 wp_notify_postauthor($comment_ID, $commentdata['comment_type']); 56 62 } … … 80 86 81 87 function wp_filter_comment($commentdata) { 82 $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']);83 $commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']);84 $commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']);85 $commentdata['comment_content'] = apply_filters('pre_comment_content', $commentdata['comment_content']);86 $commentdata['comment_author_IP'] = apply_filters('pre_comment_user_ip', $commentdata['comment_author_IP']);87 $commentdata['comment_author_url'] = apply_filters('pre_comment_author_url', $commentdata['comment_author_url']);88 $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']); 89 $commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']); 90 $commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']); 91 $commentdata['comment_content'] = apply_filters('pre_comment_content', $commentdata['comment_content']); 92 $commentdata['comment_author_IP'] = apply_filters('pre_comment_user_ip', $commentdata['comment_author_IP']); 93 $commentdata['comment_author_url'] = apply_filters('pre_comment_author_url', $commentdata['comment_author_url']); 88 94 $commentdata['comment_author_email'] = apply_filters('pre_comment_author_email', $commentdata['comment_author_email']); 89 95 $commentdata['filtered'] = true;
Note: See TracChangeset
for help on using the changeset viewer.