diff --git a/templates/gdpr-register.php b/templates/gdpr-register.php index e1537693..ca0f790a 100644 --- a/templates/gdpr-register.php +++ b/templates/gdpr-register.php @@ -7,64 +7,66 @@ * Page: "Register" * Call: function display_option() * - * @version 2.6.1 + * @version 2.9.3 * * @var object $um_content_query * @var array $args */ -if ( ! defined( 'ABSPATH' ) ) exit; +if ( ! defined( 'ABSPATH' ) ) { + exit; +} // The "Privacy Policy" field content can not contain forms. $allowed_html = UM()->get_allowed_html( 'templates' ); unset( $allowed_html['form'] ); + +$content = ''; +if ( ! empty( $args['use_gdpr_content_id'] ) ) { + $um_content_query = get_post( $args['use_gdpr_content_id'] ); + if ( ! empty( $um_content_query ) && ! is_wp_error( $um_content_query ) ) { + $content = apply_filters( 'um_gdpr_policies_page_content', $um_content_query->post_content, $args ); + $content = apply_filters( 'the_content', $content, $um_content_query->ID ); + } +} + +$toggle_show = ! empty( $args['use_gdpr_toggle_show'] ) ? $args['use_gdpr_toggle_show'] : __( 'Show privacy policy', 'ultimate-member' ); +$toggle_hide = ! empty( $args['use_gdpr_toggle_hide'] ) ? $args['use_gdpr_toggle_hide'] : __( 'Hide privacy policy', 'ultimate-member' ); +$toggle_title = ! empty( $args['use_gdpr_toggle_show'] ) ? $args['use_gdpr_toggle_show'] : __( 'Show privacy policy', 'ultimate-member' ); +$confirm = ! empty( $args['use_gdpr_agreement'] ) ? $args['use_gdpr_agreement'] : __( 'Please confirm that you agree to our privacy policy', 'ultimate-member' ); + +$form_errors = UM()->form()->errors; +$error_message = ! empty( $args['use_gdpr_error_text'] ) ? $args['use_gdpr_error_text'] : __( 'Please confirm your acceptance of our privacy policy', 'ultimate-member' ); ?>
- +