Make WordPress Core

Ticket #31570: 31570.3.diff

File 31570.3.diff, 487 bytes (added by fuhton, 9 years ago)

Refresh from trunk, but with only necessary changes

  • src/wp-admin/includes/ajax-actions.php

     
    23762376        $query = new WP_Query( $query );
    23772377
    23782378        $posts = array_map( 'wp_prepare_attachment_for_js', $query->posts );
    2379         $posts = array_filter( $posts );
     2379        $posts = array_values( array_filter( $posts ) );
    23802380
    23812381        wp_send_json_success( $posts );
    23822382}