0 ) { global $wpdb; $tt24_table_entries = $wpdb->prefix . 'tt24_entries'; $tt24_table_fields = $wpdb->prefix . 'tt24_entry_fields'; $tt24_table_forms = $wpdb->prefix . 'tt24_forms'; // Fetch the Parent Entry and join the Form Title // FIX: Silencing false-positive DB warnings // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching $tt24_entry = $wpdb->get_row( $wpdb->prepare( " SELECT e.*, f.title as form_name, f.form_settings FROM {$tt24_table_entries} e LEFT JOIN {$tt24_table_forms} f ON e.form_id = f.id WHERE e.id = %d ", $tt24_entry_id ) ); // phpcs:enable if ( ! $tt24_entry ) { echo '

' . esc_html__( 'Error: Entry not found or has been deleted.', '24tt-unrestricted-forms' ) . '

'; return; } // Fetch the submitted fields for this specific entry // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared // phpcs:disable WordPress.DB.DirectDatabaseQuery.DirectQuery // phpcs:disable WordPress.DB.DirectDatabaseQuery.NoCaching $tt24_submitted_data = $wpdb->get_results( $wpdb->prepare( " SELECT field_name, field_value FROM {$tt24_table_fields} WHERE entry_id = %d ORDER BY id ASC ", $tt24_entry_id ) ); // phpcs:enable // BUG FIX v1.1.0: Smart Label Mapping that understands the new JSON format $parsed_data = json_decode( $tt24_entry->form_settings, true ); $tt24_layout_settings = array(); $tt24_field_labels = array(); if ( is_array( $parsed_data ) ) { if ( isset( $parsed_data['layout'] ) ) { $tt24_layout_settings = is_array( $parsed_data['layout'] ) ? $parsed_data['layout'] : array(); } else { $tt24_layout_settings = $parsed_data; // Legacy v1.0.0 format } } // Build the translation dictionary if ( is_array( $tt24_layout_settings ) ) { foreach ( $tt24_layout_settings as $tt24_field ) { if ( isset( $tt24_field['name'] ) && isset( $tt24_field['label'] ) ) { $tt24_field_labels[ $tt24_field['name'] ] = $tt24_field['label']; } } } ?>

←

form_name ?: __( 'Unknown Form', '24tt-unrestricted-forms' ) ); ?>

field_name ] ) ) { $tt24_display_label = $tt24_field_labels[ $tt24_data->field_name ]; } else { // SMART FALLBACK: If label is missing, clean up the ugly key slightly $tt24_display_label = ucwords( str_replace( array( '_', '-' ), ' ', sanitize_text_field( $tt24_data->field_name ) ) ); } ?>


created_at ) ) ); ?>


ip_address ); ?>


user_agent ); ?>


'tt24-forms-entries', 'action' => 'delete', 'entry_id' => $tt24_entry_id ), admin_url( 'admin.php' ) ), 'tt24_delete_entry_' . $tt24_entry_id ); ?>

' . esc_html__( 'Error: The entries table class could not be loaded.', '24tt-unrestricted-forms' ) . '

'; return; } $tt24_entries_table = new TT24_Entries_List_Table(); $tt24_entries_table->prepare_items(); ?>


—
0 ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended $tt24_deleted_count = absint( $_GET['deleted'] ); /* translators: %s: number of deleted entries */ $tt24_del_msg = sprintf( _n( '%s entry permanently deleted.', '%s entries permanently deleted.', $tt24_deleted_count, '24tt-unrestricted-forms' ), number_format_i18n( $tt24_deleted_count ) ); printf( '

%s

', esc_html( $tt24_del_msg ) ); } ?>
display(); ?>