From 5cb6ae6dc5d3b9c16f744beac190e48e9a181d32 Mon Sep 17 00:00:00 2001 From: Mykyta Synelnikov Date: Tue, 14 Jan 2025 15:39:01 +0200 Subject: [PATCH] * prepared to the release --- includes/um-short-functions.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/includes/um-short-functions.php b/includes/um-short-functions.php index 4df3d2bd..244f3f19 100644 --- a/includes/um-short-functions.php +++ b/includes/um-short-functions.php @@ -693,6 +693,27 @@ function um_user_submitted_registration_formatted( $style = false ) { $output .= um_user_submited_display( 'use_gdpr_agreement', __( 'GDPR Applied', 'ultimate-member' ), $submitted_data ); } + /** + * Filters the custom HTML before user registration submitted and formatted data. + * + * @param {string} $before_html Custom HTML before submitted data. + * @param {string} $output Prepared submitted data in HTML format. + * @param {array} $submitted_data Submitted user data during registration. + * + * @return {string} Custom HTML before submitted data. + * + * @since 2.9.2 + * @hook um_before_user_submitted_registration_data + * + * @example Change custom HTML before user registration submitted and formatted data. + * function my_user_submitted_registration_data( $before_html, $output, $submitted_data ) { + * if ( ! empty( $submitted_data['custom_data'] ) ) { + * $before_html .= 'Custom HTML here'; + * } + * return $before_html; + * } + * add_filter( 'um_before_user_submitted_registration_data', 'my_user_submitted_registration_data', 10, 3 ); + */ $output .= apply_filters( 'um_before_user_submitted_registration_data', '', $output, $submitted_data ); if ( isset( $submitted_data ) && is_array( $submitted_data ) ) {