mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
Attach Media: Display the correct error message when search result is empty.
fixes #29093. Built from https://develop.svn.wordpress.org/trunk@29356 git-svn-id: http://core.svn.wordpress.org/trunk@29132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8ea68677f3
commit
608d505b24
@ -1637,8 +1637,9 @@ function wp_ajax_find_posts() {
|
||||
|
||||
$posts = get_posts( $args );
|
||||
|
||||
if ( ! $posts )
|
||||
wp_die( __('No items found.') );
|
||||
if ( ! $posts ) {
|
||||
wp_send_json_error( __( 'No items found.' ) );
|
||||
}
|
||||
|
||||
$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>';
|
||||
$alt = '';
|
||||
|
Loading…
Reference in New Issue
Block a user