Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Admin_Profile::prepare_fields()
Setup fields to be added to the profile screen
Return Return
(array)
Source Source
File: includes/admin/class-llms-admin-profile.php
private function prepare_fields() { $fields = llms_get_user_information_fields(); $prepared = array(); /** * Filters the list of user information fields which are excluded from the admin profile. * * By default WP core fields are excluded as they are automatically rendered on the screen * by the WP core. * * @since 5.0.0 * * @param string[] $fields A list of field ids to be excluded. */ $excluded = apply_filters( 'llms_admin_profile_excluded_fields', array( 'user_login', 'email_address', 'password', 'first_name', 'last_name', 'display_name', ) ); foreach ( $fields as $field ) { // Skip excluded fields. if ( in_array( $field['name'], $excluded, true ) ) { continue; } // For display purposes. $field['columns'] = 6; // Handle weird exception. $field['label'] = ( 'llms_billing_address_2' === $field['name'] ) ? __( 'Address line 2', 'lifterlms' ) : $field['label']; $prepared[] = $field; } /** * Fields to be added in the profile screen * * @since 5.0.0 * * @param array[] $fields Array of fields. */ return apply_filters( 'llms_admin_profile_fields', $prepared ); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |