diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index f3751cb..916948e 100644
|
|
|
function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { |
| 352 | 352 | |
| 353 | 353 | // JS didn't send us everything we need to know. Just die with success message |
| 354 | 354 | if ( ! $total || ! $per_page || ! $page || ! $url ) { |
| 355 | | $time = time(); |
| 356 | | $comment = get_comment( $comment_id ); |
| | 355 | $time = time(); |
| | 356 | $comment = get_comment( $comment_id ); |
| | 357 | $comment_status = ''; |
| | 358 | $comment_link = ''; |
| | 359 | |
| | 360 | if ( $comment ) { |
| | 361 | $comment_status = $comment->comment_approved; |
| | 362 | } |
| | 363 | |
| | 364 | if ( 1 === (int) $comment_status ) { |
| | 365 | $comment_link = get_comment_link( $comment ); |
| | 366 | } |
| 357 | 367 | |
| 358 | 368 | $counts = wp_count_comments(); |
| 359 | 369 | |
| … |
… |
function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { |
| 362 | 372 | // Here for completeness - not used. |
| 363 | 373 | 'id' => $comment_id, |
| 364 | 374 | 'supplemental' => array( |
| 365 | | 'status' => $comment ? $comment->comment_approved : '', |
| | 375 | 'status' => $comment_status, |
| 366 | 376 | 'postId' => $comment ? $comment->comment_post_ID : '', |
| 367 | 377 | 'time' => $time, |
| 368 | 378 | 'in_moderation' => $counts->moderated, |
| … |
… |
function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) { |
| 373 | 383 | 'i18n_moderation_text' => sprintf( |
| 374 | 384 | _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ), |
| 375 | 385 | number_format_i18n( $counts->moderated ) |
| 376 | | ) |
| | 386 | ), |
| | 387 | 'comment_link' => $comment_link |
| 377 | 388 | ) |
| 378 | 389 | ) ); |
| 379 | 390 | $x->send(); |
diff --git src/wp-includes/js/wp-lists.js src/wp-includes/js/wp-lists.js
index 117e892..6f856c1 100644
|
|
|
wpList = { |
| 297 | 297 | res = wpAjax.parseAjaxResponse(r, s.response, s.element); |
| 298 | 298 | rres = r; |
| 299 | 299 | |
| | 300 | // Handle the specific case for the "submitted on" link of Comments List Table |
| | 301 | if ( 'undefined' !== typeof res.responses[0].supplemental.comment_link ) { |
| | 302 | var submittedOn = element.find( '.submitted-on' ), commentLink = element.find( '.submitted-on a' ); |
| | 303 | |
| | 304 | // Comment is approved add the link |
| | 305 | if ( res.responses[0].supplemental.comment_link ) { |
| | 306 | submittedOn.html( $('<a></a>').html( submittedOn.html() ).prop( 'href', res.responses[0].supplemental.comment_link ) ); |
| | 307 | |
| | 308 | // Comment is not approved remove the link |
| | 309 | } else if ( commentLink.length ) { |
| | 310 | submittedOn.html( commentLink.html() ); |
| | 311 | } |
| | 312 | } |
| | 313 | |
| 300 | 314 | if ( !res || res.errors ) { |
| 301 | 315 | element.stop().stop().css( 'backgroundColor', '#FF3333' )[isClass?'removeClass':'addClass'](s.dimClass).show().queue( function() { list.wpList.recolor(); $(this).dequeue(); } ); |
| 302 | 316 | return false; |