Changeset 12300 for trunk/wp-includes/comment.php
- Timestamp:
- 12/01/2009 02:06:02 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note: See TracChangeset
for help on using the changeset viewer.