Retrieve user information fields used by the block editor

Description Description

This is used for JS localization purposes and returns a reduced set of data as used by the editor for validation purposes.

Top ↑

Return Return


Top ↑

Source Source

File: includes/functions/llms-functions-user-information-fields.php

function llms_get_user_information_fields_for_editor() {

	$fields = llms_get_user_information_fields();

	 * Filters the list of keys included for user information fields when localized into the block editor
	 * @since 5.0.0
	 * @param string[] $keys Array of key names.
	$keys = apply_filters(

	// Add a value so we can use array_interect_key() later.
	$keys = array_fill_keys( $keys, 1 );

	// Return a reduced list.
	return array_map(
		function( $field ) use ( $keys ) {
			return array_intersect_key( $field, $keys );

Top ↑

Changelog Changelog

Version Description
5.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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