LLMS_Admin_User_Custom_Fields::output_custom_fields( WP_User|int $user )

Output custom field data fields as HTML inputs


Parameters Parameters

$user

(WP_User|int) (Required) Instance of WP_User or WP User ID.


Top ↑

Return Return

(void)


Top ↑

Source Source

File: includes/admin/class.llms.admin.user.custom.fields.php

	public function output_custom_fields( $user ) {

		if ( is_numeric( $user ) || is_a( $user, 'WP_User' ) ) {
			$this->get_fields_with_data( $user );
		} else {
			$this->get_fields();
		}

		if ( empty( $this->fields ) ) {
			return;
		}

		llms_get_template(
			'admin/user-edit.php',
			array(
				'section_title' => __( 'LifterLMS Profile (legacy fields)', 'lifterlms' ),
				'fields'        => $this->fields,
			)
		);

	}


Top ↑

Changelog Changelog

Changelog
Version Description
5.0.0 Do not include user-edit template if no fields to show.
3.24.0 Unknown.
2.7.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.