Add filter 'um_submit_form_data'

This commit is contained in:
champsupertramp
2016-05-22 14:20:50 +08:00
parent 0fe320edf3
commit 729b4af5c0
+7 -5
View File
@@ -130,6 +130,8 @@ class UM_Form {
}
$this->post_form = apply_filters('um_submit_form_data', $this->post_form, $this->post_form['mode'] );
/* Continue based on form mode - pre-validation */
do_action('um_submit_form_errors_hook', $this->post_form );
@@ -153,11 +155,11 @@ class UM_Form {
$this->processing = $form['form_id'];
foreach($form as $key => $value){
if (strstr($key, $this->form_suffix) ) {
$a_key = str_replace( $this->form_suffix, '', $key);
$form[$a_key] = $value;
unset($form[$key]);
foreach( $form as $key => $value ){
if ( strstr( $key, $this->form_suffix ) ) {
$a_key = str_replace( $this->form_suffix, '', $key );
$form[ $a_key ] = $value;
unset( $form[ $key ] );
}
}