PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / trunk
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More vtrunk
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
formidable / classes / views / frm-fields / front-end / gdpr / gdpr-field.php

gdpr-field.php in Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More trunk, at classes/views/frm-fields/front-end/gdpr/gdpr-field.php

38 lines 1.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Show the GDPR Field on the front-end.
4 *
5 * @package Formidable
6 */
7
8 if ( ! defined( 'ABSPATH' ) ) {
9 die( 'You are not allowed to call this page directly.' );
10 }
11
12 $agreement_text = $field['gdpr_agreement_text'];
13 $field_id = $field['id'];
14 $checked = FrmAppHelper::check_selected( $field['value'], 1 ) ? ' checked="checked"' : '';
15 $label_id = 'frm-gdpr-accept-' . $field_id;
16 ?>
17
18 <?php if ( ! FrmFieldGdprHelper::hide_gdpr_field() ) : ?>
19 <div class="frm_checkbox" role="group" aria-labelledby="<?php echo esc_attr( $label_id ); ?>">
20 <label for="<?php echo esc_attr( $label_id ); ?>">
21 <input type="checkbox" aria-required="true" name="item_meta[<?php echo esc_attr( $field_id ); ?>]" id="<?php echo esc_attr( $label_id ); ?>" value="1"
22 <?php echo $checked . ' '; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
23 <?php do_action( 'frm_field_input_html', $field ); ?>
24 />
25 <?php FrmAppHelper::kses_echo( $agreement_text, array( 'a', 'b', 'br', 'div', 'em', 'i', 'p', 'span', 'strong' ) ); ?>
26 </label>
27 </div>
28 <?php elseif ( current_user_can( 'frm_edit_forms' ) ) : ?>
29 <div class="frm_checkbox" role="group" aria-labelledby="<?php echo esc_attr( $label_id ); ?>">
30 <label for="<?php echo esc_attr( $label_id ); ?>">
31 <?php
32 /* translators: %1$s: Link HTML, %2$s: End link */
33 printf( esc_html__( 'GDPR field is disabled. Please enable it in the Formidable %1$sSettings%2$s.', 'formidable' ), '<a href="?page=formidable-settings" target="_blank">', '</a>' );
34 ?>
35 </label>
36 </div>
37 <?php endif; ?>
38