wordpress/wp-content/themes/basic/themify/themify-metabox/includes/themify-user-fields.php
/**
	 * Display the custom fields on user profile page
	 *
	 * @uses get_fields method
	 */
Display the custom fields on user profile page
@uses get_fields method
Display the custom fields on user profile page @uses get_fields method
function user_fields( $user ) {
		$groups = $this->get_fields();
		if( empty( $groups ) ) {
			return;
		}
		foreach( $groups as $id => $group ) : ?>
			<?php if( isset( $group['title'] ) ) : ?><h3><?php echo $group['title']; ?></h3><?php endif; ?>
			<?php if( isset( $group['description'] ) ) : ?><p><?php echo $group['description']; ?></p><?php endif; ?>
			<table class="form-table" id="<?php echo $id; ?>">
			<?php
			$post_id = 0;
			$themify_custom_panel_nonce = wp_create_nonce( "themify-custom-panel" );
			foreach( $group['fields'] as $field ) :
				$meta_value = isset( $field['name'] ) ? get_the_author_meta( $field['name'], $user->ID ) : '';
				$toggle_class = '';
				$ext_attr = '';
				if( isset($field['toggle']) ){
					$toggle_class .= 'themify-toggle ';
					$toggle_class .= (is_array($field['toggle'])) ? implode(' ', $field['toggle']) : $field['toggle'];
					if ( is_array( $field['toggle'] ) && in_array( '0-toggle', $field['toggle'] ) ) {
						$toggle_class .= ' default-toggle';
					}
				}
				if ( isset( $field['class'] ) ) {
					$toggle_class .= ' ';
					$toggle_class .= is_array( $field['class'] ) ? implode( ' ', $field['class'] ) : $field['class'];
				}
				$data_hide = '';
				if ( isset( $field['hide'] ) ) {
					$data_hide = is_array( $field['hide'] ) ? implode( ' ', $field['hide'] ) : $field['hide'];
				}
				if( isset($field['default_toggle']) && $field['default_toggle'] == 'hidden' ){
					$ext_attr = 'style="display:none;"';
				}
				if( isset($field['enable_toggle']) && $field['enable_toggle'] == true ) {
					$toggle_class .= ' enable_toggle';
				}
				?>
				<tr class="themify_field_row">
					<th><label for=""><?php echo $field['title']; ?></label></th>
					<td class="themify_field">
						<?php
						do_action( "themify_metabox/field/{$field['type']}", array(
							'meta_box' => $field,
							'meta_value' => $meta_value,
							'toggle_class' => $toggle_class,
							'data_hide' => $data_hide,
							'ext_attr' => $ext_attr,
							'post_id' => $post_id,
							'themify_custom_panel_nonce' => $themify_custom_panel_nonce
						) );
						if( isset( $field['function'] ) && is_callable( $field['function'] ) ) {
							call_user_func( $field['function'], $field );
						}
						?>
					</td>
				</tr>
				<?php 
			endforeach; ?>
			</table>
		<?php endforeach;
	}
function user_fields ( $ user ) { $ groups = $ this -> get_fields ( ) ; if ( empty ( $ groups ) ) { return ; } foreach ( $ groups as $ id => $ group ) : ?> <?php if ( isset ( $ group [ 'title' ] ) ) : ?> <h3> <?php echo $ group [ 'title' ] ; ?> </h3> <?php endif ; ?> <?php if ( isset ( $ group [ 'description' ] ) ) : ?> <p> <?php echo $ group [ 'description' ] ; ?> </p> <?php endif ; ?> <table class="form-table" id=" <?php echo $ id ; ?> ">
			 <?php $ post_id = 0 ; $ themify_custom_panel_nonce = wp_create_nonce ( " themify-custom-panel " ) ; foreach ( $ group [ 'fields' ] as $ field ) : $ meta_value = isset ( $ field [ 'name' ] ) ? get_the_author_meta ( $ field [ 'name' ] , $ user -> ID ) : '' ; $ toggle_class = '' ; $ ext_attr = '' ; if ( isset ( $ field [ 'toggle' ] ) ) { $ toggle_class .= 'themify-toggle ' ; $ toggle_class .= ( is_array ( $ field [ 'toggle' ] ) ) ? implode ( ' ' , $ field [ 'toggle' ] ) : $ field [ 'toggle' ] ; if ( is_array ( $ field [ 'toggle' ] ) && in_array ( '0-toggle' , $ field [ 'toggle' ] ) ) { $ toggle_class .= ' default-toggle' ; } } if ( isset ( $ field [ 'class' ] ) ) { $ toggle_class .= ' ' ; $ toggle_class .= is_array ( $ field [ 'class' ] ) ? implode ( ' ' , $ field [ 'class' ] ) : $ field [ 'class' ] ; } $ data_hide = '' ; if ( isset ( $ field [ 'hide' ] ) ) { $ data_hide = is_array ( $ field [ 'hide' ] ) ? implode ( ' ' , $ field [ 'hide' ] ) : $ field [ 'hide' ] ; } if ( isset ( $ field [ 'default_toggle' ] ) && $ field [ 'default_toggle' ] == 'hidden' ) { $ ext_attr = 'style="display:none;"' ; } if ( isset ( $ field [ 'enable_toggle' ] ) && $ field [ 'enable_toggle' ] == true ) { $ toggle_class .= ' enable_toggle' ; } ?> <tr class="themify_field_row">
					<th><label for=""> <?php echo $ field [ 'title' ] ; ?> </label></th>
					<td class="themify_field">
						 <?php do_action ( " themify_metabox/field/ { $ field [ 'type' ] } " , array ( 'meta_box' => $ field , 'meta_value' => $ meta_value , 'toggle_class' => $ toggle_class , 'data_hide' => $ data_hide , 'ext_attr' => $ ext_attr , 'post_id' => $ post_id , 'themify_custom_panel_nonce' => $ themify_custom_panel_nonce ) ) ; if ( isset ( $ field [ 'function' ] ) && is_callable ( $ field [ 'function' ] ) ) { call_user_func ( $ field [ 'function' ] , $ field ) ; } ?> </td>
				</tr>

				 <?php endforeach ; ?> </table>
		 <?php endforeach ; }
Display the custom fields on user profile page
 @uses get_fields method
Display the custom fields on user profile page @uses get_fields method
// backward compatibility: allow custom function calls in the fields array