Skip to content

Commit 1bf5a9a

Browse files
authored
Merge pull request #49 from RRZE-Webteam/dev
Dev
2 parents a683d3e + 9066d6e commit 1bf5a9a

8 files changed

+91
-91
lines changed

data/consent-cookies.php

+6-27
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
defined('ABSPATH') || exit;
66

77
$data = [
8-
'version' => 1,
8+
'version' => 2,
99
'items' => [
1010
'default' => [
1111
'id' => 'default',
@@ -178,27 +178,6 @@
178178
'status' => true,
179179
'static' => true,
180180
],
181-
'instagram' => [
182-
'id' => 'instagram',
183-
'cookie_name' => 'pigeon_state',
184-
'category' => 'external_media',
185-
'name' => __('Instagram', 'rrze-legal'),
186-
'provider' => __('Meta Platforms Ireland Limited, 4 Grand Canal Square, Dublin 2, Ireland', 'rrze-legal'),
187-
'purpose' => __('Used to unblock Instagram content.', 'rrze-legal'),
188-
'privacy_policy_url' => 'https://www.instagram.com/legal/privacy/',
189-
'hosts' => 'instagram.com',
190-
'cookie_expiry' => __('Session', 'rrze-legal'),
191-
'enqueued_script_handles' => '',
192-
'block_enqueued_script' => false,
193-
'prioritize' => false,
194-
'async_opt_out_code' => false,
195-
'opt_in_js' => '<script>if(typeof window.RRZELegal === "object") { window.RRZELegal.unblockContentId("instagram"); }</script>',
196-
'opt_out_js' => '',
197-
'fallback_js' => '',
198-
'position' => 2,
199-
'status' => true,
200-
'static' => true,
201-
],
202181
'youtube' => [
203182
'id' => 'youtube',
204183
'cookie_name' => 'NID',
@@ -220,7 +199,7 @@
220199
'opt_in_js' => '<script>if(typeof window.RRZELegal === "object") { window.RRZELegal.unblockContentId("youtube"); }</script>',
221200
'opt_out_js' => '',
222201
'fallback_js' => '',
223-
'position' => 3,
202+
'position' => 2,
224203
'status' => true,
225204
'static' => true,
226205
],
@@ -241,7 +220,7 @@
241220
'opt_in_js' => '<script>if(typeof window.RRZELegal === "object") { window.RRZELegal.unblockContentId("vimeo"); }</script>',
242221
'opt_out_js' => '',
243222
'fallback_js' => '',
244-
'position' => 4,
223+
'position' => 3,
245224
'status' => true,
246225
'static' => true,
247226
],
@@ -262,7 +241,7 @@
262241
'opt_in_js' => '<script>if(typeof window.RRZELegal === "object") { window.RRZELegal.unblockContentId("slideshare"); }</script>',
263242
'opt_out_js' => '',
264243
'fallback_js' => '',
265-
'position' => 5,
244+
'position' => 4,
266245
'status' => true,
267246
'static' => true,
268247
],
@@ -285,7 +264,7 @@
285264
'opt_in_js' => '<script>if(typeof window.RRZELegal === "object") { window.RRZELegal.unblockContentId("brmediathek"); }</script>',
286265
'opt_out_js' => '',
287266
'fallback_js' => '',
288-
'position' => 6,
267+
'position' => 5,
289268
'status' => consent()->isServiceProviderActive('brmediathek'),
290269
'static' => true,
291270
],
@@ -308,7 +287,7 @@
308287
'opt_in_js' => '<script>if(typeof window.RRZELegal === "object") { window.RRZELegal.unblockContentId("ardmediathek"); }</script>',
309288
'opt_out_js' => '',
310289
'fallback_js' => '',
311-
'position' => 7,
290+
'position' => 6,
312291
'status' => consent()->isServiceProviderActive('ardmediathek'),
313292
'static' => true,
314293
],

includes/Update.php

+25
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public static function loaded()
1919
} elseif (version_compare($version, '1.0.0', '==')) {
2020
self::updateToVersion200();
2121
Utils::redirectToReferer();
22+
} elseif (version_compare($version, '2.0.0', '==')) {
23+
self::updateToVersion220();
24+
Utils::redirectToReferer();
2225
}
2326
}
2427

@@ -90,6 +93,28 @@ protected static function updateToVersion200()
9093
update_option($cookiesOptionsName, $cookiesOptions);
9194
}
9295

96+
/**
97+
* Update to version 2.2.0.
98+
* @return void
99+
*/
100+
protected static function updateToVersion220()
101+
{
102+
$tosOptionName = tos()->getOptionName();
103+
$cookiesOptionsName = consentCookies()->getOptionName();
104+
$cookiesOptions = consentCookies()->getOptions();
105+
106+
foreach ($cookiesOptions as $key => $value) {
107+
$id = $value['id'] ?? '';
108+
$category = $value['category'] ?? '';
109+
if ($category === 'external_media' && $id === 'instagram') {
110+
unset($cookiesOptions[$key]);
111+
break;
112+
}
113+
}
114+
update_option($cookiesOptionsName, $cookiesOptions);
115+
update_option($tosOptionName . '_version', '2.2.0');
116+
}
117+
93118
/**
94119
* Options map (v1.0.0).
95120
* @return array

languages/rrze-legal-de_DE.mo

-322 Bytes
Binary file not shown.

languages/rrze-legal-de_DE.po

+29-31
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ msgid ""
44
msgstr ""
55
"Project-Id-Version: RRZE Legal 1.0\n"
66
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/rrze-legal\n"
7-
"POT-Creation-Date: 2022-07-14T08:52:40+00:00\n"
8-
"PO-Revision-Date: 2022-07-14 10:53+0200\n"
7+
"POT-Creation-Date: 2022-07-14T12:53:48+00:00\n"
8+
"PO-Revision-Date: 2022-07-14 14:54+0200\n"
99
"Last-Translator: \n"
1010
"Language-Team: \n"
1111
"Language: de_DE\n"
@@ -102,7 +102,7 @@ msgstr ""
102102
"ausgewählt wurden."
103103

104104
#: data/consent-cookies.php:19 data/consent-cookies.php:124
105-
#: data/consent-cookies.php:280 data/consent-cookies.php:303
105+
#: data/consent-cookies.php:259 data/consent-cookies.php:282
106106
msgid "1 Year"
107107
msgstr "1 Jahr"
108108

@@ -122,7 +122,6 @@ msgstr "Teste, ob ein Cookie gesetzt werden kann. Benutzersitzung speichern."
122122

123123
#: data/consent-cookies.php:40 data/consent-cookies.php:61
124124
#: data/consent-cookies.php:82 data/consent-cookies.php:103
125-
#: data/consent-cookies.php:190
126125
msgid "Session"
127126
msgstr "Session"
128127

@@ -196,82 +195,70 @@ msgid "Unlimited"
196195
msgstr "Unbegrenzt"
197196

198197
#: data/consent-cookies.php:185
199-
msgid "Instagram"
200-
msgstr "Instagram"
201-
202-
#: data/consent-cookies.php:186
203-
msgid "Meta Platforms Ireland Limited, 4 Grand Canal Square, Dublin 2, Ireland"
204-
msgstr "Meta Platforms Ireland Limited, 4 Grand Canal Square, Dublin 2, Irland"
205-
206-
#: data/consent-cookies.php:187
207-
msgid "Used to unblock Instagram content."
208-
msgstr "Wird verwendet, um Instagram-Inhalte zu entsperren."
209-
210-
#: data/consent-cookies.php:206
211198
msgid "YouTube"
212199
msgstr "YouTube"
213200

214-
#: data/consent-cookies.php:207
201+
#: data/consent-cookies.php:186
215202
msgid "Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Ireland"
216203
msgstr "Google Ireland Limited, Gordon House, Barrow Street, Dublin 4, Irland"
217204

218-
#: data/consent-cookies.php:208
205+
#: data/consent-cookies.php:187
219206
msgid "Used to unblock YouTube content."
220207
msgstr "Wird verwendet, um Youtube-Inhalte zu entsperren."
221208

222-
#: data/consent-cookies.php:215
209+
#: data/consent-cookies.php:194
223210
msgid "6 Months"
224211
msgstr "6 Monate"
225212

226-
#: data/consent-cookies.php:231
213+
#: data/consent-cookies.php:210
227214
msgid "Vimeo"
228215
msgstr "Vimeo"
229216

230-
#: data/consent-cookies.php:232
217+
#: data/consent-cookies.php:211
231218
msgid "Vimeo Inc., 555 West 18th Street, New York, New York 10011, USA"
232219
msgstr ""
233220
"Vimeo Inc., 555 West 18th Street, New York, New York 10011, Vereinigte "
234221
"Staaten"
235222

236-
#: data/consent-cookies.php:233
223+
#: data/consent-cookies.php:212
237224
msgid "Used to unblock Vimeo content."
238225
msgstr "Wird verwendet, um Vimeo-Inhalte zu entsperren."
239226

240-
#: data/consent-cookies.php:236 data/consent-cookies.php:257
227+
#: data/consent-cookies.php:215 data/consent-cookies.php:236
241228
msgid "2 Years"
242229
msgstr "2 Jahre"
243230

244-
#: data/consent-cookies.php:252
231+
#: data/consent-cookies.php:231
245232
msgid "Slideshare"
246233
msgstr "Slideshare"
247234

248-
#: data/consent-cookies.php:253
235+
#: data/consent-cookies.php:232
249236
msgid "Scribd, Inc., 460 Bryant St, 100, San Francisco, CA 94107-2594 USA"
250237
msgstr ""
251238
"Scribd, Inc., 460 Bryant St, 100, San Francisco, CA 94107-2594 Vereinigten "
252239
"Staten"
253240

254-
#: data/consent-cookies.php:254
241+
#: data/consent-cookies.php:233
255242
msgid "Used to unblock Slideshare content."
256243
msgstr "Wird verwendet, um Slideshare-Inhalte zu entsperren."
257244

258-
#: data/consent-cookies.php:273
245+
#: data/consent-cookies.php:252
259246
msgid "BR Mediathek"
260247
msgstr "BR Mediathek"
261248

262-
#: data/consent-cookies.php:274 data/consent-cookies.php:297
249+
#: data/consent-cookies.php:253 data/consent-cookies.php:276
263250
msgid "Bayerischer Rundfunk, Rundfunkplatz 1, 80335 Munich, Germany"
264251
msgstr "Bayerischer Rundfunk, Rundfunkplatz 1, 80335 München, Deutschland"
265252

266-
#: data/consent-cookies.php:275
253+
#: data/consent-cookies.php:254
267254
msgid "Used to unblock BR content."
268255
msgstr "Wird verwendet, um BR-Inhalte zu entsperren."
269256

270-
#: data/consent-cookies.php:296
257+
#: data/consent-cookies.php:275
271258
msgid "ARD Mediathek"
272259
msgstr "ARD Mediathek"
273260

274-
#: data/consent-cookies.php:298
261+
#: data/consent-cookies.php:277
275262
msgid "Used to unblock ARD content."
276263
msgstr "Wird verwendet, um ARD-Inhalte zu entsperren."
277264

@@ -1972,6 +1959,17 @@ msgstr "Adresse"
19721959
msgid "Postal address as an alternative to email address."
19731960
msgstr "Postanschrift als Alternative zur E-Mail-Adresse."
19741961

1962+
#~ msgid "Instagram"
1963+
#~ msgstr "Instagram"
1964+
1965+
#~ msgid ""
1966+
#~ "Meta Platforms Ireland Limited, 4 Grand Canal Square, Dublin 2, Ireland"
1967+
#~ msgstr ""
1968+
#~ "Meta Platforms Ireland Limited, 4 Grand Canal Square, Dublin 2, Irland"
1969+
1970+
#~ msgid "Used to unblock Instagram content."
1971+
#~ msgstr "Wird verwendet, um Instagram-Inhalte zu entsperren."
1972+
19751973
#~ msgid "Facebook"
19761974
#~ msgstr "Facebook"
19771975

languages/rrze-legal-de_DE_formal.mo

-322 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)