PluginProbe
GDPR / 1.4.7
GDPR v1.4.7
trunk 1.4.7 2.0.0 2.0.1 2.0.10 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2
gdpr / admin / partials / settings.php

settings.php in GDPR 1.4.7, at admin/partials/settings.php

325 lines 18.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="wrap gdpr">
2 <h1><?php esc_html_e( 'Settings', 'gdpr' ); ?></h1>
3 <div class="nav-tab-wrapper">
4 <?php foreach ( $tabs as $tab => $value ) : ?>
5 <a href="<?php echo '#' . $tab; ?>" class="nav-tab">
6 <?php echo esc_html( $value ); ?>
7 </a>
8 <?php endforeach; ?>
9 </div>
10
11 <?php settings_errors(); ?>
12
13 <form action="options.php" method="post" class="gdpr-settings-form">
14
15 <?php settings_fields( 'gdpr' ); ?>
16
17 <div class="gdpr-tab hidden" data-id="general">
18 <h2><?php esc_html_e( 'General', 'gdpr' ) ?></h2>
19 <table class="form-table" data-id="general">
20 <tbody>
21 <tr>
22 <th scope="row">
23 <label for="gdpr_privacy_policy_page"><?php esc_html_e( 'Privacy Policy Page', 'gdpr' ) ?></label>
24 </th>
25 <td>
26 <?php
27 $pages = get_pages();
28 ?>
29 <select name="gdpr_privacy_policy_page" id="gdpr_privacy_policy_page">
30 <option value=""><?php esc_html_e( '-- Select --', 'gdpr' ) ?></option>
31 <?php foreach ( $pages as $page ): ?>
32 <option value="<?php echo esc_attr( $page->ID ) ?>" <?php selected( $privacy_policy_page, $page->ID ); ?>><?php echo esc_html( $page->post_title ); ?></option>
33 <?php endforeach ?>
34 </select>
35 </td>
36 </tr>
37 <tr>
38 <th scope="row">
39 <label for="gdpr_email_limit"><?php esc_html_e( 'Outgoing email limitation', 'gdpr' ) ?></label>
40 </th>
41 <td>
42 <?php $limit = get_option( 'gdpr_email_limit', 100 ); ?>
43 <input type="number" name="gdpr_email_limit" id="gdpr_email_limit" value="<?php echo esc_attr( $limit ); ?>">
44 </td>
45 </tr>
46 <tr>
47 <th scope="row">
48 <label for="gdpr_deletion_needs_review"><?php esc_html_e( 'User deletion', 'gdpr' ) ?></label>
49 </th>
50 <td>
51 <?php $needs_review = get_option( 'gdpr_deletion_needs_review', true ); ?>
52 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_deletion_needs_review' ); ?>" id="gdpr_deletion_needs_review" value="1" <?php checked( $needs_review, true ); ?>><span class="description"><label for="gdpr_deletion_needs_review"><?php esc_html_e( 'Send all deletion requests to the review table.', 'gdpr' ); ?></label></label>
53 </td>
54 </tr>
55 <tr>
56 <th scope="row">
57 <label for="gdpr_disable_css"><?php esc_html_e( 'Disable CSS', 'gdpr' ) ?></label>
58 </th>
59 <td>
60 <?php $disable_css = get_option( 'gdpr_disable_css', false ); ?>
61 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_disable_css' ); ?>" id="gdpr_disable_css" value="1" <?php checked( $disable_css, true ); ?>><label for="gdpr_disable_css"><span class="description"><?php esc_html_e( 'Make sure you know what you are doing before checking this.', 'gdpr' ); ?></span></label>
62 </td>
63 </tr>
64 <tr>
65 <th scope="row">
66 <label for="gdpr_enable_telemetry_tracker"><?php esc_html_e( 'Enable the Telemetry Tracker', 'gdpr' ) ?></label>
67 </th>
68 <td>
69 <?php $enable_telemetry = get_option( 'gdpr_enable_telemetry_tracker', false ); ?>
70 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_enable_telemetry_tracker' ); ?>" id="gdpr_enable_telemetry_tracker" value="1" <?php checked( $enable_telemetry, true ); ?>><label for="gdpr_enable_telemetry_tracker"><span class="description"><?php esc_html_e( 'Toggles the Telemetry Tracker On/Off. (experimental)', 'gdpr' ); ?></span></label>
71 </td>
72 </tr>
73 </tbody>
74 </table>
75 <h2 class="title"><?php esc_html_e( 'Privacy Center', 'gdpr' ); ?></h2>
76 <p>
77 <?php esc_html_e( 'This section handles the privacy bar and some of the privacy preferences window.', 'gdpr' ) ?><br>
78 <strong><?php esc_html_e( 'Important:', 'gdpr' ); ?></strong> <?php esc_html_e( 'If the privacy banner text is not filled out, the privacy banner will not show up. Even if you registered your cookies.', 'gdpr' ) ?></p>
79 <table class="form-table" data-id="general">
80 <tbody>
81 <tr>
82 <th scope="row">
83 <label for="gdpr_cookie_banner_content"><?php esc_html_e( 'Privacy Banner Text', 'gdpr' ) ?></label>
84 </th>
85 <td>
86 <?php $privacy_bar_content = get_option( 'gdpr_cookie_banner_content', '' ); ?>
87 <textarea name="gdpr_cookie_banner_content" id="gdpr_cookie_banner_content" cols="80" rows="6"><?php echo esc_html( $privacy_bar_content ); ?></textarea>
88 </td>
89 </tr>
90 <tr>
91 <th scope="row">
92 <label for="gdpr_cookie_privacy_excerpt"><?php esc_html_e( 'Privacy Excerpt', 'gdpr' ) ?></label>
93 </th>
94 <td>
95 <?php $privacy_excerpt = get_option( 'gdpr_cookie_privacy_excerpt', '' ); ?>
96 <textarea name="gdpr_cookie_privacy_excerpt" id="gdpr_cookie_privacy_excerpt" cols="80" rows="6"><?php echo esc_html( $privacy_excerpt ); ?></textarea>
97 <p class="description"><?php esc_html_e( 'This will appear in the consent section of the privacy preference window.', 'gdpr' ); ?></p>
98 </td>
99 </tr>
100 </tbody>
101 </table>
102 <h2 class="title"><?php esc_html_e( 'Request Forms reCAPTCHA', 'gdpr' ); ?></h2>
103 <p><?php esc_html_e( 'To prevent spam attacks, you have the option to enable reCAPTCHA. Configure below your keys to make it work with our request forms.', 'gdpr' ); ?></p>
104 <p>
105 <?php echo sprintf(
106 /* translators: External link with instructions on how to proceed. */
107 esc_html__( 'You can find the necessary information %s.', 'gdpr' ),
108 '<a href="https://www.google.com/recaptcha/admin" target="_blank">' . esc_html__( 'here', 'gdpr' ) . '</a>'
109 ) ?></p>
110 <table class="form-table" data-id="general">
111 <tbody>
112 <tr>
113 <th scope="row">
114 <label for="gdpr_use_recaptcha"><?php esc_html_e( 'Enable reCAPTCHA', 'gdpr' ) ?></label>
115 </th>
116 <td>
117 <?php $use_recaptcha = get_option( 'gdpr_use_recaptcha', false ); ?>
118 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_use_recaptcha' ); ?>" id="gdpr_use_recaptcha" value="1" <?php checked( $use_recaptcha, true ); ?>>
119 </td>
120 </tr>
121 <tr>
122 <th scope="row">
123 <label for="gdpr_recaptcha_site_key"><?php esc_html_e( 'Site Key', 'gdpr' ) ?></label>
124 </th>
125 <td>
126 <?php $site_key = get_option( 'gdpr_recaptcha_site_key', '' ); ?>
127 <input type="text" name="gdpr_recaptcha_site_key" value="<?php echo esc_attr( $site_key ); ?>" placeholder="">
128 </td>
129 </tr>
130 <tr>
131 <th scope="row">
132 <label for="gdpr_recaptcha_secret_key"><?php esc_html_e( 'Secret Key', 'gdpr' ) ?></label>
133 </th>
134 <td>
135 <?php $secret_key = get_option( 'gdpr_recaptcha_secret_key', '' ); ?>
136 <input type="password" name="gdpr_recaptcha_secret_key" value="<?php echo esc_attr( $secret_key ); ?>" placeholder="">
137 </td>
138 </tr>
139 </tbody>
140 </table>
141 <?php if ( class_exists( 'WooCommerce' ) ): ?>
142 <h2 class="title"><?php esc_html_e( 'WooCommerce', 'gdpr' ); ?></h2>
143 <table class="form-table" data-id="general">
144 <tbody>
145 <tr>
146 <th scope="row">
147 <label for="gdpr_add_consent_checkboxes_registration"><?php esc_html_e( 'Add consent checkboxes to the registration page', 'gdpr' ) ?></label>
148 </th>
149 <td>
150 <?php $add_checkboxes_to_registration = get_option( 'gdpr_add_consent_checkboxes_registration', false ); ?>
151 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_add_consent_checkboxes_registration' ); ?>" id="gdpr_add_consent_checkboxes_registration" value="1" <?php checked( $add_checkboxes_to_registration, true ); ?>>
152 </td>
153 </tr>
154 <tr>
155 <th scope="row">
156 <label for="gdpr_add_consent_checkboxes_checkout"><?php esc_html_e( 'Add consent checkboxes to the checkout registration form', 'gdpr' ) ?></label>
157 </th>
158 <td>
159 <?php $add_checkboxes_to_checkout = get_option( 'gdpr_add_consent_checkboxes_checkout', false ); ?>
160 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_add_consent_checkboxes_checkout' ); ?>" id="gdpr_add_consent_checkboxes_checkout" value="1" <?php checked( $add_checkboxes_to_checkout, true ); ?>>
161 </td>
162 </tr>
163 </tbody>
164 </table>
165 <?php endif ?>
166 </div>
167 <div class="gdpr-tab hidden" data-id="cookies">
168 <h2><?php esc_html_e( 'Cookies', 'gdpr' ) ?></h2>
169 <input type="text" id="cookie-tabs" class="regular-text" placeholder="<?php esc_attr_e( 'Category name', 'gdpr' ); ?>">
170 <button class="button button-primary add-tab"><?php esc_html_e( 'Add tab', 'gdpr' ); ?></button>
171 <div id="tabs">
172 <?php $cookie_tabs = get_option( 'gdpr_cookie_popup_content', array() ); ?>
173 <?php if ( ! empty( $cookie_tabs ) ) : ?>
174 <?php foreach ( $cookie_tabs as $tab_key => $tab ) : ?>
175 <div class="postbox" id="cookie-tab-content-<?php echo esc_attr( $tab_key ); ?>">
176 <h2 class="hndle"><?php echo esc_html( $tab['name'] ); ?><button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php esc_html_e( 'Remove this tab.', 'gdpr' ); ?></span></button></h2>
177 <input type="hidden" name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][name]" value="<?php echo esc_attr( $tab['name'] ); ?>" />
178 <div class="inside">
179 <table class="form-table">
180 <tr>
181 <th><label for="always-active-<?php echo esc_attr( $tab_key ); ?>"><?php esc_html_e( 'Always active', 'gdpr' ); ?></label></th>
182 <td>
183 <label class="gdpr-switch">
184 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][always_active]" <?php checked( esc_attr( $tab['always_active'] ), 1 ); ?> id="always-active-<?php echo esc_attr( $tab_key ); ?>">
185 <span class="gdpr-slider round"></span>
186 </label>
187 </td>
188 </tr>
189 <tr>
190 <th><label for="tab-how-we-use-<?php echo esc_attr( $tab_key ); ?>"><?php esc_html_e( 'How we use', 'gdpr' ); ?></label></th>
191 <td><textarea name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][how_we_use]" id="tab-how-we-use-<?php echo esc_attr( $tab_key ); ?>" cols="53" rows="3" required><?php echo esc_html( $tab['how_we_use'] ); ?></textarea></td>
192 </tr>
193 <tr>
194 <th><label for="cookies-used-<?php echo esc_attr( $tab_key ); ?>"><?php esc_html_e( 'Cookies used by the site', 'gdpr' ); ?></label></th>
195 <td>
196 <textarea cols="53" rows="3" name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][cookies_used]" id="cookies-used-<?php echo esc_attr( $tab_key ); ?>" required><?php echo esc_attr( $tab['cookies_used'] ); ?></textarea>
197 <br>
198 <span class="description"><?php esc_html_e( 'Comma separated list.', 'gdpr' ); ?></span>
199 </td>
200 </tr>
201 <tr>
202 <th><label for="hosts-<?php echo esc_attr( $tab_key ); ?>"><?php esc_html_e( 'Third party domains', 'gdpr' ); ?></label></th>
203 <td>
204 <input type="text" id="hosts-<?php echo esc_attr( $tab_key ); ?>" class="regular-text" placeholder="domain.com" />
205 <button class="button button-primary add-host" data-tabid="<?php echo esc_attr( $tab_key ); ?>"><?php esc_html_e( 'Add', 'gdpr' ); ?></button>
206 <br>
207 <span class="description"><?php esc_html_e( 'Cookies that are set by a third party, like facebook.com.', 'gdpr' ); ?></span>
208 </td>
209 </tr>
210 </table>
211 <div class="tab-hosts" data-tabid="<?php echo esc_attr( $tab_key ); ?>">
212 <?php if ( isset( $tab['hosts'] ) && $tab['hosts'] ) : ?>
213 <?php foreach ( $tab['hosts'] as $host_key => $host ) : ?>
214 <div class="postbox">
215 <h2 class="hndle"><?php echo esc_attr( $host_key ); ?><button class="notice-dismiss" type="button"><span class="screen-reader-text"><?php esc_html_e( 'Remove this domain.', 'gdpr' ); ?></span></button></h2>
216 <input type="hidden" name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][hosts][<?php echo esc_attr( $host_key ); ?>][name]" value="<?php echo esc_attr( $host_key ); ?>" />
217 <div class="inside">
218 <table class="form-table">
219 <tr>
220 <th><label for="hosts-cookies-used-<?php echo esc_attr( $host_key ); ?>"><?php esc_html_e( 'Cookies used', 'gdpr' ); ?></label></th>
221 <td>
222 <textarea cols="53" rows="3" name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][hosts][<?php echo esc_attr( $host_key ); ?>][cookies_used]" id="hosts-cookies-used-<?php echo esc_attr( $host_key ); ?>" required><?php echo esc_attr( $host['cookies_used'] ); ?></textarea>
223 <br>
224 <span class="description"><?php esc_html_e( 'Comma separated list.', 'gdpr' ); ?></span>
225 </td>
226 </tr>
227 <tr>
228 <th><label for="hosts-cookies-optout-<?php echo esc_attr( $host_key ); ?>"><?php esc_html_e( 'How to Opt Out', 'gdpr' ); ?></label></th>
229 <td>
230 <input type="text" name="<?php echo esc_attr( 'gdpr_cookie_popup_content' ); ?>[<?php echo esc_attr( $tab_key ); ?>][hosts][<?php echo esc_attr( $host_key ); ?>][optout]" value="<?php echo esc_attr( $host['optout'] ); ?>" id="hosts-cookies-optout-<?php echo esc_attr( $host_key ); ?>" class="regular-text" required />
231 <br>
232 <span class="description"><?php esc_html_e( 'Url with instructions on how to opt out.', 'gdpr' ); ?></span>
233 </td>
234 </tr>
235 </table>
236 </div>
237 </div>
238 <?php endforeach; ?>
239 <?php endif; ?>
240 </div>
241 </div><!-- .inside -->
242 </div><!-- .postbox -->
243 <?php endforeach ?>
244 <?php endif ?>
245 </div>
246 </div>
247 <div class="gdpr-tab hidden" data-id="consents">
248 <h2><?php esc_html_e( 'Consents', 'gdpr' ) ?></h2>
249 <input type="text" id="type-of-consent" class="regular-text" placeholder="<?php esc_attr_e( 'Type of consent', 'gdpr' ); ?>">
250 <button class="button button-primary add-consent"><?php esc_html_e( 'Add consent', 'gdpr' ); ?></button>
251 <div id="consent-tabs">
252 <?php
253 $default_consent_types = array(
254 'privacy-policy' => array(
255 'name' => 'Privacy Policy',
256 'required' => 'on',
257 'description' => sprintf( __( 'You read and agreed to our %s.', 'gdpr' ), '<a href="" target="_blank">' . esc_html( 'Privacy Policy', 'gdpr' ) . '</a>' ),
258 'registration' => sprintf( __( 'You read and agreed to our %s.', 'gdpr' ), '<a href="" target="_blank">' . esc_html( 'Privacy Policy', 'gdpr' ) . '</a>' ),
259 )
260 );
261 $consent_types = get_option( 'gdpr_consent_types', $default_consent_types ); ?>
262 <?php if ( ! empty( $consent_types ) ) : ?>
263 <?php foreach ( $consent_types as $consent_key => $consent ) : ?>
264 <div class="postbox" id="consent-type-content-<?php echo esc_attr( $consent_key ); ?>">
265 <h2 class="hndle"><?php echo esc_html( $consent['name'] ); ?> <span>(id: <?php echo esc_html( $consent_key ); ?>)</span><?php echo ( 'privacy-policy' === $consent_key ) ? '' : '<button class="notice-dismiss" type="button"><span class="screen-reader-text">' . esc_html__( 'Unregister this consent.', 'gdpr' ) . '</span></button>'; ?></h2>
266 <input type="hidden" name="<?php echo esc_attr( 'gdpr_consent_types' ); ?>[<?php echo esc_attr( $consent_key ); ?>][name]" value="<?php echo esc_attr( $consent['name'] ); ?>" />
267 <div class="inside">
268 <table class="form-table">
269 <tr>
270 <th><label for="required-<?php echo esc_attr( $consent_key ); ?>"><?php esc_html_e( 'Required', 'gdpr' ); ?></label></th>
271 <td>
272 <?php if ( 'privacy-policy' === $consent_key ): ?>
273 <span><?php esc_html_e( 'Required', 'gdpr' ) ?></span>
274 <input type="hidden" name="<?php echo esc_attr( 'gdpr_consent_types' ); ?>[<?php echo esc_attr( $consent_key ); ?>][required]" id="required-<?php echo esc_attr( $consent_key ); ?>" value="1">
275 <?php else: ?>
276 <label class="gdpr-switch">
277 <input type="checkbox" name="<?php echo esc_attr( 'gdpr_consent_types' ); ?>[<?php echo esc_attr( $consent_key ); ?>][required]" <?php checked( esc_attr( $consent['required'] ), 1 ); ?> id="required-<?php echo esc_attr( $consent_key ); ?>">
278 <span class="gdpr-slider round"></span>
279 </label>
280 <?php endif; ?>
281 </td>
282 </tr>
283 <tr>
284 <th><label for="consent-description-<?php echo esc_attr( $consent_key ); ?>"><?php esc_html_e( 'Consent description', 'gdpr' ); ?></label></th>
285 <td><textarea name="<?php echo esc_attr( 'gdpr_consent_types' ); ?>[<?php echo esc_attr( $consent_key ); ?>][description]" id="consent-description-<?php echo esc_attr( $consent_key ); ?>" cols="53" rows="3" required><?php echo esc_html( $consent['description'] ); ?></textarea></td>
286 </tr>
287 <tr>
288 <th><label for="consent-registration-<?php echo esc_attr( $consent_key ); ?>"><?php esc_html_e( 'Registration message', 'gdpr' ); ?></label></th>
289 <td><textarea name="<?php echo esc_attr( 'gdpr_consent_types' ); ?>[<?php echo esc_attr( $consent_key ); ?>][registration]" id="consent-registration-<?php echo esc_attr( $consent_key ); ?>" cols="53" rows="3" required><?php echo esc_html( $consent['registration'] ); ?></textarea></td>
290 </tr>
291 </table>
292 </div><!-- .inside -->
293 </div><!-- .postbox -->
294 <?php endforeach ?>
295 <?php endif ?>
296 </div>
297 </div>
298 <div class="gdpr-tab hidden" data-id="export-chanel">
299 <h2><?php esc_html_e( 'Data Export Chanel', 'gdpr' ) ?></h2>
300 <table class="form-table" data-id="general">
301 <tbody>
302 <tr>
303 <th scope="row">
304 <label for="data-export-chanel"><?php esc_html_e( 'Data Export Chanel', 'gdpr' ) ?></label>
305 </th>
306 <td>
307 <?php
308 $export_data = get_option('gdpr_export_data');
309 ?>
310 <input name="<?php echo esc_attr( 'gdpr_export_data' ); ?>" type="radio" value="export-data" <?php if ($export_data == 'export-data') { ?> checked <?php } ?> ><?php esc_html_e( 'Data Export with email attachment', 'gdpr' ) ?> <br>
311 <input name="<?php echo esc_attr( 'gdpr_export_data' ); ?>" type="radio" value="file-export-data" <?php if ($export_data == 'file-export-data') { ?> checked <?php } ?>><?php esc_html_e( 'Data Export with download link', 'gdpr' ) ?> <br>
312 </td>
313 </tr>
314 </tbody>
315 </table>
316 </div>
317 <?php
318 do_action( 'gdpr_extra_settings' );
319 submit_button();
320 ?>
321 </form>
322
323 <!-- #poststuff -->
324 </div>
325