@@ -278,18 +278,20 @@ protected function display_tablenav( $which ) {
278278 protected function extra_tablenav ( $ which ) {
279279 $ form_id = FrmAppHelper::simple_get ( 'form ' , 'absint ' );
280280
281- if ( $ which === 'top ' && ! $ form_id ) {
282- echo '<div class="alignleft actions"> ' ;
281+ if ( $ which !== 'top ' || $ form_id ) {
282+ return ;
283+ }
283284
284- // Override the referrer to prevent it from being used for the screen options.
285- echo '<input type="hidden" name="_wp_http_referer" value="" /> ' ;
285+ echo '<div class="alignleft actions"> ' ;
286286
287- echo '<label for="form" class="screen-reader-text"> ' . esc_html__ ( 'Filter by form ' , 'formidable ' ) . '</label> ' ;
287+ // Override the referrer to prevent it from being used for the screen options.
288+ echo '<input type="hidden" name="_wp_http_referer" value="" /> ' ;
288289
289- FrmFormsHelper::forms_dropdown ( 'form ' , $ form_id , array ( 'blank ' => __ ( 'View all forms ' , 'formidable ' ) ) );
290- submit_button ( __ ( 'Filter ' , 'formidable ' ), 'filter_action action ' , '' , false , array ( 'id ' => 'post-query-submit ' ) );
291- echo '</div> ' ;
292- }
290+ echo '<label for="form" class="screen-reader-text"> ' . esc_html__ ( 'Filter by form ' , 'formidable ' ) . '</label> ' ;
291+
292+ FrmFormsHelper::forms_dropdown ( 'form ' , $ form_id , array ( 'blank ' => __ ( 'View all forms ' , 'formidable ' ) ) );
293+ submit_button ( __ ( 'Filter ' , 'formidable ' ), 'filter_action action ' , '' , false , array ( 'id ' => 'post-query-submit ' ) );
294+ echo '</div> ' ;
293295 }
294296
295297 /**
@@ -500,11 +502,11 @@ private function maybe_fix_column_name( $column_name ) {
500502 * @return void
501503 */
502504 private function get_actions ( &$ actions , $ item , $ view_link ) {
503- $ actions ['view ' ] = '<a href=" ' . esc_url ( $ view_link ) . '"> ' . __ ( 'View ' , 'formidable ' ) . '</a> ' ;
505+ $ actions ['view ' ] = '<a href=" ' . esc_url ( $ view_link ) . '"> ' . esc_html__ ( 'View ' , 'formidable ' ) . '</a> ' ;
504506
505507 if ( current_user_can ( 'frm_delete_entries ' ) ) {
506508 $ delete_link = '?page=formidable-entries&frm_action=destroy&id= ' . $ item ->id . '&form= ' . $ this ->params ['form ' ];
507- $ actions ['delete ' ] = '<a href=" ' . esc_url ( wp_nonce_url ( $ delete_link ) ) . '" class="submitdelete" data-frmverify=" ' . esc_attr__ ( 'Permanently delete this entry? ' , 'formidable ' ) . '" data-frmverify-btn="frm-button-red"> ' . __ ( 'Delete ' , 'formidable ' ) . '</a> ' ; // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
509+ $ actions ['delete ' ] = '<a href=" ' . esc_url ( wp_nonce_url ( $ delete_link ) ) . '" class="submitdelete" data-frmverify=" ' . esc_attr__ ( 'Permanently delete this entry? ' , 'formidable ' ) . '" data-frmverify-btn="frm-button-red"> ' . esc_html__ ( 'Delete ' , 'formidable ' ) . '</a> ' ; // phpcs:ignore SlevomatCodingStandard.Files.LineLength.LineTooLong
508510 }
509511
510512 $ actions = apply_filters ( 'frm_row_actions ' , $ actions , $ item );
0 commit comments