PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 12.3.2
Jetpack – WP Security, Backup, Speed, & Growth v12.3.2
16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 13.7.2 13.8.3 All 506 releases
jetpack / modules / widgets / eu-cookie-law / form.php

form.php in Jetpack – WP Security, Backup, Speed, & Growth 12.3.2, at modules/widgets/eu-cookie-law/form.php

300 lines 7.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * EU Cookie Law Widget form.
4 *
5 * @package automattic/jetpack
6 */
7
8 use Automattic\Jetpack\Redirect;
9
10 // phpcs:disable VariableAnalysis.CodeAnalysis.VariableAnalysis.UndefinedVariable
11 ?>
12 <p>
13 <strong>
14 <?php esc_html_e( 'Banner text', 'jetpack' ); ?>
15 </strong>
16 <ul>
17 <li>
18 <label>
19 <input
20 <?php checked( $instance['text'], 'default' ); ?>
21 name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"
22 type="radio"
23 value="default"
24 />
25 <?php esc_html_e( 'Default', 'jetpack' ); ?>
26 </label>
27 </li>
28 <li>
29 <label>
30 <input
31 <?php checked( $instance['text'], 'custom' ); ?>
32 name="<?php echo esc_attr( $this->get_field_name( 'text' ) ); ?>"
33 type="radio"
34 value="custom"
35 />
36 <?php esc_html_e( 'Custom:', 'jetpack' ); ?>
37 </label>
38 </li>
39 </ul>
40 <textarea
41 class="widefat"
42 name="<?php echo esc_attr( $this->get_field_name( 'customtext' ) ); ?>"
43 placeholder="<?php echo esc_attr( $instance['default-text'] ); ?>"
44 ><?php echo esc_html( $instance['customtext'] ); ?></textarea>
45 </p>
46
47 <hr />
48
49 <p>
50 <strong>
51 <?php esc_html_e( 'Privacy Policy Link', 'jetpack' ); ?>
52 </strong>
53 <ul class="eu-cookie-law-widget-policy-url">
54 <li>
55 <label>
56 <input
57 <?php checked( $instance['policy-url'], 'default' ); ?>
58 name="<?php echo esc_attr( $this->get_field_name( 'policy-url' ) ); ?>"
59 type="radio"
60 value="default"
61 />
62 <?php esc_html_e( 'Default', 'jetpack' ); ?>
63 </label>
64 </li>
65 <li>
66 <label>
67 <input
68 <?php checked( $instance['policy-url'], 'custom' ); ?>
69 name="<?php echo esc_attr( $this->get_field_name( 'policy-url' ) ); ?>"
70 type="radio"
71 value="custom"
72 />
73 <?php esc_html_e( 'Custom URL:', 'jetpack' ); ?>
74 </label>
75 <input
76 class="widefat"
77 name="<?php echo esc_attr( $this->get_field_name( 'custom-policy-url' ) ); ?>"
78 placeholder="<?php echo esc_url( $instance['default-policy-url'] ); ?>"
79 style="margin-top: .5em;"
80 type="text"
81 value="<?php echo esc_url( $instance['custom-policy-url'] ); ?>"
82 />
83 <span class="notice notice-warning default-policy" style="display: none;">
84 <span style="display: block; margin: .5em 0;">
85 <strong><?php esc_html_e( 'Caution:', 'jetpack' ); ?></strong>
86 <?php esc_html_e( 'The default policy URL only covers cookies set by Jetpack. If you’re running other plugins, custom cookies, or third-party tracking technologies, you should create and link to your own cookie statement.', 'jetpack' ); ?>
87 </span>
88 </span>
89 <?php if ( Jetpack::is_module_active( 'wordads' ) ) : ?>
90 <span class="notice notice-warning custom-policy" style="display: none;">
91 <span style="display: block; margin: .5em 0;">
92 <strong><?php esc_html_e( 'Caution:', 'jetpack' ); ?></strong>
93 <?php
94 echo sprintf(
95 wp_kses(
96 /* Translators: %s is the URL to a Jetpack support article. */
97 __( 'For GDPR compliance, please make sure your policy contains <a href="%s" target="_blank">privacy information relating to WordAds</a>.', 'jetpack' ),
98 array(
99 'a' => array(
100 'href' => array(),
101 'target' => array(),
102 ),
103 )
104 ),
105 esc_url( Redirect::get_url( 'jetpack-support-ads', array( 'anchor' => 'privacy' ) ) )
106 );
107 ?>
108 </span>
109 </span>
110 <?php endif; ?>
111 </li>
112 </ul>
113 </p>
114
115 <p>
116 <strong>
117 <?php esc_html_e( 'Link text', 'jetpack' ); ?>
118 </strong>
119 <label>
120 <input
121 class="widefat"
122 name="<?php echo esc_attr( $this->get_field_name( 'policy-link-text' ) ); ?>"
123 type="text"
124 value="<?php echo esc_attr( $instance['policy-link-text'] ); ?>"
125 />
126 </label>
127 </p>
128
129 <hr />
130
131 <p>
132 <strong>
133 <?php esc_html_e( 'Button text', 'jetpack' ); ?>
134 </strong>
135 <label>
136 <input
137 class="widefat"
138 name="<?php echo esc_attr( $this->get_field_name( 'button' ) ); ?>"
139 type="text"
140 value="<?php echo esc_attr( $instance['button'] ); ?>"
141 />
142 </label>
143 </p>
144
145 <hr />
146
147 <p>
148 <strong>
149 <?php esc_html_x( 'Capture consent & hide the banner', 'action', 'jetpack' ); ?>
150 </strong>
151 <ul>
152 <li>
153 <label>
154 <input
155 <?php checked( $instance['hide'], 'button' ); ?>
156 name="<?php echo esc_attr( $this->get_field_name( 'hide' ) ); ?>"
157 type="radio"
158 value="button"
159 <?php echo Jetpack::is_module_active( 'wordads' ) ? 'disabled' : ''; ?>
160 />
161 <?php esc_html_e( 'after the user clicks the dismiss button', 'jetpack' ); ?>
162 </label>
163 </li>
164 <li>
165 <label>
166 <input
167 <?php checked( $instance['hide'], 'scroll' ); ?>
168 name="<?php echo esc_attr( $this->get_field_name( 'hide' ) ); ?>"
169 type="radio"
170 value="scroll"
171 <?php echo Jetpack::is_module_active( 'wordads' ) ? 'disabled' : ''; ?>
172 />
173 <?php esc_html_e( 'after the user scrolls the page', 'jetpack' ); ?>
174 </label>
175 </li>
176 <li>
177 <label>
178 <input
179 <?php checked( $instance['hide'], 'time' ); ?>
180 name="<?php echo esc_attr( $this->get_field_name( 'hide' ) ); ?>"
181 type="radio"
182 value="time"
183 <?php echo Jetpack::is_module_active( 'wordads' ) ? 'disabled' : ''; ?>
184 />
185 <?php esc_html_e( 'after this amount of time', 'jetpack' ); ?>
186 </label>
187 <input
188 max="1000"
189 min="3"
190 name="<?php echo esc_attr( $this->get_field_name( 'hide-timeout' ) ); ?>"
191 style="padding: 3px 5px; width: 3em;"
192 type="number"
193 value="<?php echo esc_attr( $instance['hide-timeout'] ); ?>"
194 />
195 <?php esc_html_e( 'seconds', 'jetpack' ); ?>
196 </li>
197 </ul>
198 <?php if ( Jetpack::is_module_active( 'wordads' ) ) : ?>
199 <span class="notice notice-warning" style="display: block;">
200 <span style="display: block; margin: .5em 0;">
201 <?php esc_html_e( 'Visitors must provide consent by clicking the dismiss button when WordAds is turned on.', 'jetpack' ); ?>
202 </span>
203 </span>
204 <?php endif; ?>
205 </p>
206
207 <hr />
208
209 <p>
210 <strong>
211 <?php esc_html_x( 'Consent expires after', 'action', 'jetpack' ); ?>
212 </strong>
213 <ul>
214 <li>
215 <input
216 max="365"
217 min="1"
218 name="<?php echo esc_attr( $this->get_field_name( 'consent-expiration' ) ); ?>"
219 style="padding: 3px 5px; width: 3.75em;"
220 type="number"
221 value="<?php echo esc_attr( $instance['consent-expiration'] ); ?>"
222 />
223 <?php esc_html_e( 'days', 'jetpack' ); ?>
224 </li>
225 </ul>
226 </p>
227
228 <hr />
229
230 <p>
231 <strong>
232 <?php esc_html_e( 'Color scheme', 'jetpack' ); ?>
233 </strong>
234 <ul>
235 <li>
236 <label>
237 <input
238 <?php checked( $instance['color-scheme'], 'default' ); ?>
239 name="<?php echo esc_attr( $this->get_field_name( 'color-scheme' ) ); ?>"
240 type="radio"
241 value="default"
242 />
243 <?php esc_html_e( 'Light', 'jetpack' ); ?>
244 </label>
245 </li>
246 <li>
247 <label>
248 <input
249 <?php checked( $instance['color-scheme'], 'negative' ); ?>
250 name="<?php echo esc_attr( $this->get_field_name( 'color-scheme' ) ); ?>"
251 type="radio"
252 value="negative"
253 />
254 <?php esc_html_e( 'Dark', 'jetpack' ); ?>
255 </label>
256 </li>
257 </ul>
258 </p>
259
260 <hr />
261
262 <p>
263 <strong>
264 <?php esc_html_e( 'Position', 'jetpack' ); ?>
265 </strong>
266 <ul>
267 <li>
268 <label>
269 <input
270 <?php checked( $instance['position'], 'bottom' ); ?>
271 name="<?php echo esc_attr( $this->get_field_name( 'position' ) ); ?>"
272 type="radio"
273 value="bottom"
274 />
275 <?php esc_html_e( 'Bottom', 'jetpack' ); ?>
276 </label>
277 </li>
278 <li>
279 <label>
280 <input
281 <?php checked( $instance['position'], 'top' ); ?>
282 name="<?php echo esc_attr( $this->get_field_name( 'position' ) ); ?>"
283 type="radio"
284 value="top"
285 />
286 <?php esc_html_e( 'Top', 'jetpack' ); ?>
287 </label>
288 </li>
289 </ul>
290 </p>
291
292 <hr />
293
294 <p class="small">
295 <?php esc_html_e( 'It is your own responsibility to ensure that your site complies with the relevant laws.', 'jetpack' ); ?>
296 <a href="<?php echo esc_url( Redirect::get_url( 'jetpack-support-extra-sidebar-widgets-eu-cookie-law-widget' ) ); ?>">
297 <?php esc_html_e( 'Click here for more information', 'jetpack' ); ?>
298 </a>
299 </p>
300