Changeset 53723 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 07/19/2022 04:17:56 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r53455 r53723 1278 1278 check_ajax_referer( $action, '_ajax_nonce-replyto-comment' ); 1279 1279 1280 $comment_post_ ID= (int) $_POST['comment_post_ID'];1281 $post = get_post( $comment_post_ ID);1280 $comment_post_id = (int) $_POST['comment_post_ID']; 1281 $post = get_post( $comment_post_id ); 1282 1282 1283 1283 if ( ! $post ) { … … 1285 1285 } 1286 1286 1287 if ( ! current_user_can( 'edit_post', $comment_post_ ID) ) {1287 if ( ! current_user_can( 'edit_post', $comment_post_id ) ) { 1288 1288 wp_die( -1 ); 1289 1289 } … … 1332 1332 1333 1333 $comment_auto_approved = false; 1334 $commentdata = compact( 'comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'comment_parent', 'user_ID' ); 1334 1335 $commentdata = array( 1336 'comment_post_ID' => $comment_post_id, 1337 ); 1338 1339 $commentdata += compact( 1340 'comment_author', 1341 'comment_author_email', 1342 'comment_author_url', 1343 'comment_content', 1344 'comment_type', 1345 'comment_parent', 1346 'user_ID' 1347 ); 1335 1348 1336 1349 // Automatically approve parent comment. … … 1338 1351 $parent = get_comment( $comment_parent ); 1339 1352 1340 if ( $parent && '0' === $parent->comment_approved && $parent->comment_post_ID == $comment_post_ ID) {1353 if ( $parent && '0' === $parent->comment_approved && $parent->comment_post_ID == $comment_post_id ) { 1341 1354 if ( ! current_user_can( 'edit_comment', $parent->comment_ID ) ) { 1342 1355 wp_die( -1 );
Note: See TracChangeset
for help on using the changeset viewer.