Changeset 33655 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 08/20/2015 02:50:20 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r33468 r33655 348 348 349 349 // JS didn't send us everything we need to know. Just die with success message 350 if ( !$total || !$per_page || !$page || !$url ) 351 wp_die( time() ); 350 if ( ! $total || ! $per_page || ! $page || ! $url ) { 351 $time = time(); 352 $comment = get_comment( $comment_id ); 353 354 $x = new WP_Ajax_Response( array( 355 'what' => 'comment', 356 // Here for completeness - not used. 357 'id' => $comment_id, 358 'supplemental' => array( 359 'status' => $comment ? $comment->comment_approved : '', 360 'time' => $time 361 ) 362 ) ); 363 $x->send(); 364 } 352 365 353 366 $total += $delta; … … 378 391 // The time since the last comment count. 379 392 $time = time(); 393 $comment = get_comment( $comment_id ); 380 394 381 395 $x = new WP_Ajax_Response( array( … … 384 398 'id' => $comment_id, 385 399 'supplemental' => array( 400 'status' => $comment ? $comment->comment_approved : '', 386 401 'total_items_i18n' => sprintf( _n( '%s item', '%s items', $total ), number_format_i18n( $total ) ), 387 402 'total_pages' => ceil( $total / $per_page ),
Note: See TracChangeset
for help on using the changeset viewer.