WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/02/2014 02:23:42 PM (6 years ago)
Author:
ocean90
Message:

Attach Media: Display the correct error message when search result is empty.

fixes #29093.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/ajax-actions.php

    r29354 r29356  
    16381638    $posts = get_posts( $args );
    16391639
    1640     if ( ! $posts )
    1641         wp_die( __('No items found.') );
     1640    if ( ! $posts ) {
     1641        wp_send_json_error( __( 'No items found.' ) );
     1642    }
    16421643
    16431644    $html = '<table class="widefat"><thead><tr><th class="found-radio"><br /></th><th>'.__('Title').'</th><th class="no-break">'.__('Type').'</th><th class="no-break">'.__('Date').'</th><th class="no-break">'.__('Status').'</th></tr></thead><tbody>';
Note: See TracChangeset for help on using the changeset viewer.