'; foreach ( $payment_sections as $key => $section ) { $is_active = $tab === $key; $name = $section['name'] ?? ucfirst( $key ); $input_params = array( 'id' => "frm_toggle_{$key}_settings", 'type' => 'radio', 'name' => 'frm_payment_section', 'value' => $key, 'data-frmshow' => "#frm_{$key}_settings_section", ); if ( $is_active ) { $input_params['checked'] = 'checked'; } $other_section_selectors = array_map( function ( $section ) { return "#frm_{$section}_settings_section"; }, array_diff( array_keys( $payment_sections ), array( $key ) ) ); $input_params['data-frmhide'] = implode( ',', $other_section_selectors ); $label_params = array( 'for' => "frm_toggle_{$key}_settings", 'class' => 'frm_payment_settings_tab', 'tabindex' => '0', 'role' => 'tab', 'aria-selected' => $is_active ? 'true' : 'false', ); ?> /> '; foreach ( $payment_sections as $key => $section ) { $is_active = $tab === $key; $name = $section['name'] ?? ucfirst( $key ); $section_classes = 'frm_payments_section'; // Exclude Authorize.Net as the h3 tag is added explicitly. $include_h3 = 'authorize_net' !== $key; if ( ! $is_active ) { $section_classes .= ' frm_hidden'; } ?>