LLMS_Form_Field::prepare_storage()
Setup default storage information.
Description Description
Ensures fields stored on the wp_users table have the proper default data_store
.
Return Return
(void)
Source Source
File: includes/forms/class-llms-form-field.php
protected function prepare_storage() { $name = $this->settings['name']; // Field Name => Storage Key. $users_fields = array( // We prefer these aliases for legacy reasons. 'email_address' => 'user_email', 'password' => 'user_pass', // Default wp_users column names. 'user_login' => 'user_login', 'user_pass' => 'user_pass', 'user_nicename' => 'user_nicename', 'user_email' => 'user_email', 'user_url' => 'user_url', 'display_name' => 'display_name', ); // Set data storage for items on the wp_users table. if ( in_array( $name, array_keys( $users_fields ), true ) ) { $this->settings['data_store'] = 'users'; $name = $users_fields[ $name ]; // Don't save default core confirmation fields. } elseif ( in_array( $name, array( 'email_address_confirm', 'password_confirm' ), true ) ) { $this->settings['data_store'] = false; } $this->settings['data_store_key'] = $name; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.0.0 | Introduced. |