diff --git a/classes/helpers/FrmEntriesListHelper.php b/classes/helpers/FrmEntriesListHelper.php index d14329bb3c..7ef19028eb 100644 --- a/classes/helpers/FrmEntriesListHelper.php +++ b/classes/helpers/FrmEntriesListHelper.php @@ -208,8 +208,20 @@ public function no_items() { ) ); - if ( $s ) { - esc_html_e( 'No Entries Found', 'formidable' ); + if ( $s !== '' ) { + $current_url = set_url_scheme( + 'http://' . FrmAppHelper::get_server_value( 'HTTP_HOST' ) . FrmAppHelper::get_server_value( 'REQUEST_URI' ) + ); + $clear_url = remove_query_arg( 's', $current_url ); + + echo '

'; + printf( + /* translators: %1$s: Start link HTML, %2$s: End link HTML */ + esc_html__( 'No entries match your search. %1$sClear search%2$s', 'formidable' ), + '', + '' + ); + echo '

'; return; } diff --git a/classes/helpers/FrmFormsListHelper.php b/classes/helpers/FrmFormsListHelper.php index 119f69c623..664a65e1b4 100644 --- a/classes/helpers/FrmFormsListHelper.php +++ b/classes/helpers/FrmFormsListHelper.php @@ -134,6 +134,30 @@ public function prepare_items() { * @return void */ public function no_items() { + $s = self::get_param( + array( + 'param' => 's', + 'sanitize' => 'sanitize_text_field', + ) + ); + + if ( $s !== '' ) { + $current_url = set_url_scheme( + 'http://' . FrmAppHelper::get_server_value( 'HTTP_HOST' ) . FrmAppHelper::get_server_value( 'REQUEST_URI' ) + ); + $clear_url = remove_query_arg( 's', $current_url ); + + echo '

'; + printf( + /* translators: %1$s: Start link HTML, %2$s: End link HTML */ + esc_html__( 'No forms match your search. %1$sClear search%2$s', 'formidable' ), + '', + '' + ); + echo '

'; + return; + } + if ( $this->status === 'trash' ) { echo '

'; esc_html_e( 'No forms found in the trash.', 'formidable' );