Changeset 54489 for trunk/src/wp-includes/comment.php
- Timestamp:
- 10/11/2022 04:30:40 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/comment.php
r54368 r54489 2209 2209 global $wpdb; 2210 2210 2211 /* 2212 * Normalize `user_ID` to `user_id`, but pass the old key 2213 * to the `preprocess_comment` filter for backward compatibility. 2214 */ 2211 2215 if ( isset( $commentdata['user_ID'] ) ) { 2212 2216 $commentdata['user_ID'] = (int) $commentdata['user_ID']; 2213 2217 $commentdata['user_id'] = $commentdata['user_ID']; 2218 } elseif ( isset( $commentdata['user_id'] ) ) { 2219 $commentdata['user_id'] = (int) $commentdata['user_id']; 2220 $commentdata['user_ID'] = $commentdata['user_id']; 2214 2221 } 2215 2222 … … 2236 2243 $commentdata['comment_post_ID'] = (int) $commentdata['comment_post_ID']; 2237 2244 2245 // Normalize `user_ID` to `user_id` again, after the filter. 2238 2246 if ( isset( $commentdata['user_ID'] ) && $prefiltered_user_id !== (int) $commentdata['user_ID'] ) { 2239 2247 $commentdata['user_ID'] = (int) $commentdata['user_ID']; … … 2241 2249 } elseif ( isset( $commentdata['user_id'] ) ) { 2242 2250 $commentdata['user_id'] = (int) $commentdata['user_id']; 2251 $commentdata['user_ID'] = $commentdata['user_id']; 2243 2252 } 2244 2253 … … 3588 3597 $commentdata = array( 3589 3598 'comment_post_ID' => $comment_post_id, 3590 'user_ID' => $user_id,3591 3599 ); 3592 3600 … … 3597 3605 'comment_content', 3598 3606 'comment_type', 3599 'comment_parent' 3607 'comment_parent', 3608 'user_id' 3600 3609 ); 3601 3610
Note: See TracChangeset
for help on using the changeset viewer.