Uname: Linux premium294.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Software: LiteSpeed
PHP version: 8.1.32 [ PHP INFO ] PHP os: Linux
Server Ip: 104.21.80.1
Your Ip: 216.73.216.223
User: mjbynoyq (1574) | Group: mjbynoyq (1570)
Safe Mode: OFF
Disable Function:
NONE

name : show_usermeta.php
<?php
/**
 * Show user meta on profile page
 *
 * @package FrmReg
 *
 * @var array   $meta_keys    Meta keys.
 * @var WP_User $profile_user The current WP_User object.
 */
?>

<h2><?php esc_html_e( 'Registration Form Details', 'frmreg' ); ?></h2>

<table class="wp-list-table widefat fixed striped">
	<thead>
		<tr>
			<th><?php esc_html_e( 'Name', 'frmreg' ); ?></th>
			<th><?php esc_html_e( 'Value', 'frmreg' ); ?></th>
			<?php if ( $user_can_edit_entries ) { ?>
				<th><?php esc_html_e( 'Edit', 'frmreg' ); ?></th>
			<?php } ?>
		</tr>
	</thead>

	<tbody>
		<?php
		foreach ( $meta_keys as $meta_key => $field_id ) {
			if ( empty( $profile_user->{$meta_key} ) ) {
				continue;
			}
			?>
			<tr>
				<th><strong><?php echo esc_html( ucwords( $meta_key ) ); ?></strong></th>
				<td>
					<?php
					$field = FrmField::getOne( $field_id );
					if ( $field ) {
						$meta_val = $profile_user->{$meta_key};
						// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
						echo FrmEntriesHelper::display_value( $meta_val, $field, array( 'type' => $field->type, 'truncate' => false ) );
					}
					?>
				</td>
				<?php if ( $user_can_edit_entries ) {
					$entry_id = FrmRegEntry::get_entry_for_user( $profile_user );
					?>
					<td>
						<a href="<?php echo esc_url( admin_url( 'admin.php?page=formidable-entries&frm_action=edit&id=' . absint( $entry_id ) ) ); ?>">
							<?php esc_html_e( 'Edit Entry', 'frmreg' ); ?>
						</a>
					</td>
				<?php } ?>
			</tr>
			<?php
			// Clean up the variables for the next iteration.
			unset( $field, $meta_key, $field_id );
		} ?>
	</tbody>
</table>
© 2025 XylotrechusZ