Changeset 12300
- Timestamp:
- 12/01/2009 02:06:02 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-comments-post.php
r12284 r12300 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
r12292 r12300 1127 1127 */ 1128 1128 function wp_filter_comment($commentdata) { 1129 // user_id is preferred. user_ID is accepted for back-compat.1130 1129 if ( isset($commentdata['user_ID']) ) 1131 $commentdata['user_id'] = $commentdata['user_ID'] =apply_filters('pre_user_id', $commentdata['user_ID']);1132 else 1133 $commentdata['user_id'] = $commentdata['user_ID'] =apply_filters('pre_user_id', $commentdata['user_id']);1130 $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_ID']); 1131 elseif ( isset($commentdata['user_id']) ) 1132 $commentdata['user_id'] = apply_filters('pre_user_id', $commentdata['user_id']); 1134 1133 $commentdata['comment_agent'] = apply_filters('pre_comment_user_agent', $commentdata['comment_agent']); 1135 1134 $commentdata['comment_author'] = apply_filters('pre_comment_author_name', $commentdata['comment_author']); … … 1182 1181 1183 1182 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 1184 // user_id is preferred. user_ID is accepted for back-compat.1185 1183 if ( isset($commentdata['user_ID']) ) 1186 1184 $commentdata['user_id'] = $commentdata['user_ID'] = (int) $commentdata['user_ID']; 1187 else 1188 $commentdata['user_id'] = $commentdata['user_ID'] =(int) $commentdata['user_id'];1185 elseif ( isset($commentdata['user_id']) ) 1186 $commentdata['user_id'] = (int) $commentdata['user_id']; 1189 1187 1190 1188 $commentdata['comment_parent'] = isset($commentdata['comment_parent']) ? absint($commentdata['comment_parent']) : 0; -
trunk/wp-includes/user.php
r12288 r12300 452 452 */ 453 453 function setup_userdata($for_user_id = '') { 454 global $user_login, $userdata, $user_level, $user_ id, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity;454 global $user_login, $userdata, $user_level, $user_ID, $user_email, $user_url, $user_pass_md5, $user_identity; 455 455 456 456 if ( '' == $for_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 = $user_ID = (int) $user->ID;467 $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.