Filter: um_submit_form_data

apply_filters( 'um_submit_form_data', $_post, $mode, $all_cf_metakeys ) → {array}

Filters $_POST submitted data by the UM login, registration or profile form. It's un-slashed by wp_unslash(), beautified and sanitized. role attribute is filtered by possible role. submitted key is added by code and contains summary of submission.

Internal Ultimate Member callbacks (Priority -> Callback name -> Excerpt): 9 - um_submit_form_data_trim_fields() maybe over-functionality and can be removed. 10 - um_submit_form_data_role_fields() important for conditional logic based on role fields in form.

Parameters:
Name Type Description
$_post array

Submitted data.

$mode string

Form mode. login||register||profile

$all_cf_metakeys array

Form's metakeys. Since 2.6.7.

Since:
  • 1.3.x
Source:
Returns:

Submitted data.

Type
array
Example

Extends UM form submitted data.

function my_submit_form_data( $_post, $mode, $all_cf_metakeys ) {
    $_post['some_key'] = 'some value';
    return $_post;
}
add_filter( 'um_submit_form_data', 'my_submit_form_data', 10, 3 );