Changeset 12267 for trunk/wp-includes/comment.php
- Timestamp:
- 11/23/2009 09:04:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/comment.php
r12254 r12267 1077 1077 */ 1078 1078 function wp_filter_comment($commentdata) { 1079 $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']); 1079 // user_id is preferred. user_ID is accepted for back-compat. 1080 if ( isset($commentdata['user_ID']) ) 1081 $commentdata['user_id'] = $commentdata['user_ID'] = apply_filters('pre_user_id', $commentdata['user_ID']); 1082 else 1083 $commentdata['user_id'] = $commentdata['user_ID'] = apply_filters('pre_user_id', $commentdata['user_id']); 1080 1084 $commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']); 1081 1085 $commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']); … … 1128 1132 1129 1133 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 1130 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 1134 // user_id is preferred. user_ID is accepted for back-compat. 1135 if ( isset($commentdata['user_ID']) ) 1136 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 1137 else 1138 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_id']; 1131 1139 1132 1140 $commentdata['comment_parent'] = absint($commentdata['comment_parent']); … … 1154 1162 $post = &get_post($commentdata['comment_post_ID']); // Don't notify if it's your own comment 1155 1163 1156 if ( get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_ ID'] )1164 if ( get_option('comments_notify') && $commentdata['comment_approved'] && $post->post_author != $commentdata['user_id'] ) 1157 1165 wp_notify_postauthor($comment_ID, $commentdata['comment_type']); 1158 1166 }
Note: See TracChangeset
for help on using the changeset viewer.