| @@ -91,12 +91,11 @@ | ||
| 91 | 91 | */ |
| 92 | 92 | protected function get_entry_items( &$s_query, &$join_form_in_query ) { |
| 93 | 93 | global $per_page; |
| 94 | 94 | $s_query = $this->get_search_query( $join_form_in_query ); |
| 95 | - $order = $this->get_order_by(); | |
| 96 | 95 | $limit = $this->get_limit( $per_page ); |
| 97 | 96 | |
| 98 | - return FrmEntry::getAll( $s_query, $order, $limit, true, $join_form_in_query ); | |
| 97 | + return FrmEntry::getAll( $s_query, $this->get_order_by(), $limit, true, $join_form_in_query ); | |
| 99 | 98 | } |
| 100 | 99 | |
| 101 | 100 | /** |
| 102 | 101 | * @since 6.5.4 |
| @@ -208,10 +207,22 @@ | ||
| 208 | 207 | 'sanitize' => 'sanitize_text_field', |
| 209 | 208 | ) |
| 210 | 209 | ); |
| 211 | 210 | |
| 212 | - if ( $s ) { | |
| 213 | - esc_html_e( 'No Entries Found', 'formidable' ); | |
| 211 | + if ( $s !== '' ) { | |
| 212 | + $current_url = set_url_scheme( | |
| 213 | + 'http://' . FrmAppHelper::get_server_value( 'HTTP_HOST' ) . FrmAppHelper::get_server_value( 'REQUEST_URI' ) | |
| 214 | + ); | |
| 215 | + $clear_url = remove_query_arg( 's', $current_url ); | |
| 216 | + | |
| 217 | + echo '<p>'; | |
| 218 | + printf( | |
| 219 | + /* translators: %1$s: Start link HTML, %2$s: End link HTML */ | |
| 220 | + esc_html__( 'No entries match your search. %1$sClear search%2$s', 'formidable' ), | |
| 221 | + '<a href="' . esc_url( $clear_url ) . '">', | |
| 222 | + '</a>' | |
| 223 | + ); | |
| 224 | + echo '</p>'; | |
| 214 | 225 | return; |
| 215 | 226 | } |
| 216 | 227 | |
| 217 | 228 | $form_id = $this->params['form']; |
| @@ -331,10 +342,10 @@ | ||
| 331 | 342 | return sprintf( __( 'Entry %d', 'formidable' ), $item->id ); |
| 332 | 343 | } |
| 333 | 344 | |
| 334 | 345 | /** |
| 335 | - * @param object $item | |
| 336 | - * @param string $style | |
| 346 | + * @param stdClass $item | |
| 347 | + * @param string $style | |
| 337 | 348 | * |
| 338 | 349 | * @return string |
| 339 | 350 | */ |
| 340 | 351 | public function single_row( $item, $style = '' ) { |
| @@ -364,9 +375,9 @@ | ||
| 364 | 375 | $class .= ' column-primary'; |
| 365 | 376 | } |
| 366 | 377 | |
| 367 | 378 | if ( in_array( $column_name, $hidden, true ) ) { |
| 368 | - $class .= ' frm_hidden'; | |
| 379 | + $class .= ' hidden'; | |
| 369 | 380 | } elseif ( ! $action_col && ! in_array( $column_name, $action_columns, true ) ) { |
| 370 | 381 | $action_col = $column_name; |
| 371 | 382 | } |
| 372 | 383 | |