Skip to content

Commit d955ee5

Browse files
Re-introduce mc4wp_form_data filter.
1 parent 92b0211 commit d955ee5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

includes/forms/class-form.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,18 @@ protected function parse_request_data( MC4WP_Request $request ) {
510510
// uppercase all field keys
511511
$data = array_change_key_case( $data, CASE_UPPER );
512512

513+
/**
514+
* Filters received data from a submitted form before it is processed.
515+
*
516+
* Keys are uppercased and internal fields have been stripped at this point.
517+
*
518+
* @since 3.0
519+
*
520+
* @param array $data Array containing all data in key-value pairs.
521+
* @param MC4WP_Form $form Instance of the submitted form.
522+
*/
523+
$data = (array) apply_filters( 'mc4wp_form_data', $data, $form );
524+
513525
return $data;
514526
}
515527

0 commit comments

Comments
 (0)