Changeset 12267
- Timestamp:
- 11/23/2009 09:04:11 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-comments-post.php
r12148 r12267 76 76 $comment_parent = isset($_POST['comment_parent']) ? absint($_POST['comment_parent']) : 0; 77 77 78 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ ID');78 $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_id'); 79 79 80 80 $comment_id = wp_new_comment( $commentdata ); -
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 } -
trunk/wp-includes/user.php
r11978 r12267 452 452 */ 453 453 function setup_userdata($user_id = '') { 454 global $user_login, $userdata, $user_level, $user_ ID, $user_email, $user_url, $user_pass_md5, $user_identity;454 global $user_login, $userdata, $user_level, $user_id, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity; 455 455 456 456 if ( '' == $user_id ) … … 465 465 $user_login = $user->user_login; 466 466 $user_level = (int) isset($user->user_level) ? $user->user_level : 0; 467 $user_ ID= (int) $user->ID;467 $user_id = $user_ID = (int) $user->ID; 468 468 $user_email = $user->user_email; 469 469 $user_url = $user->user_url;
Note: See TracChangeset
for help on using the changeset viewer.