PluginProbe ʕ •ᴥ•ʔ
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode / 4.3.12
Cookiebot by Usercentrics – Automatic Cookie Banner for GDPR/CCPA & Google Consent Mode v4.3.12
4.7.2 4.7.1 trunk 2.3.0 2.4.0 2.4.1 2.4.2 2.5.0 3.0.0 3.0.1 3.1.0 3.10.0 3.10.1 3.11.1 3.11.2 3.11.3 3.2.0 3.3.0 3.3.1 3.4.0 3.4.1 3.4.2 3.5.0 3.6.0 3.6.1 3.6.2 3.6.5 3.6.6 3.7.0 3.7.1 3.8.0 3.9.0 4.0.0 4.0.1 4.0.2 4.0.3 4.1.0 4.1.1 4.2.0 4.2.1 4.2.10 4.2.11 4.2.12 4.2.13 4.2.14 4.2.2 4.2.3 4.2.4 4.2.5 4.2.6 4.2.7 4.2.8 4.2.9 4.3.0 4.3.1 4.3.10 4.3.11 4.3.12 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.7.1 4.3.8 4.3.9 4.3.9.1 4.4.0 4.4.1 4.4.2 4.5.0 4.5.1 4.5.10 4.5.11 4.5.2 4.5.3 4.5.4 4.5.5 4.5.6 4.5.7 4.5.8 4.5.9 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.6.7 4.7.0
cookiebot / src / view / admin / settings / iab-page.php
cookiebot / src / view / admin / settings Last commit date
multiple-configuration 3 years ago prior-consent 2 years ago dashboard-page.php 1 year ago debug-page.php 3 years ago gcm-page.php 3 years ago gtm-page.php 1 year ago iab-page.php 1 year ago legislations-page.php 3 years ago network-settings-page.php 1 year ago settings-page.php 1 year ago support-page.php 1 year ago
iab-page.php
270 lines
1 <?php
2 /**
3 * @var bool $cookiebot_iab
4 * @var object $purposes
5 * @var object $special_purposes
6 * @var object $features
7 * @var object $special_features
8 * @var object $vendors
9 * @var array $vendor_data
10 * @var array $custom_tcf_purposes
11 * @var array $custom_tcf_special_purposes
12 * @var array $custom_tcf_features
13 * @var array $custom_tcf_special_features
14 * @var array $custom_tcf_vendors
15 * @var array $custom_tcf_restrictions
16 * @var array $custom_tcf_ac_vendors
17 * @var array $extra_providers
18 */
19
20 use cybot\cookiebot\settings\pages\Iab_Page;
21
22 $iab_page = new Iab_Page();
23 ?>
24 <div class="cb-settings__config__item">
25 <div class="cb-settings__config__content">
26 <h3 class="cb-settings__config__subtitle"><?php esc_html_e( 'IAB Integration:', 'cookiebot' ); ?></h3>
27 <p class="cb-general__info__text">
28 <?php esc_html_e( 'If you want to use the IAB Framework TCF within your Consent Management Platform (CMP) you can enable it on the right. Be aware that activating this could override some of the configurations you made with the default setup defined by the IAB.', 'cookiebot' ); ?>
29 </p>
30 <a href="https://support.cookiebot.com/hc/en-us/articles/360007652694-Cookiebot-and-the-IAB-Consent-Framework"
31 target="_blank" class="cb-btn cb-link-btn" rel="noopener">
32 <?php esc_html_e( 'Read more on IAB with Cookiebot CMP here', 'cookiebot' ); ?>
33 </a>
34 </div>
35 <div class="cb-settings__config__data">
36 <div class="cb-settings__config__data__inner">
37 <label class="switch-checkbox" for="cookiebot-iab">
38 <input type="checkbox" name="cookiebot-iab" id="cookiebot-iab" value="1"
39 <?php checked( 1, $cookiebot_iab ); ?>>
40 <div class="switcher"></div>
41 <?php esc_html_e( 'IAB TCF V2.2 integration', 'cookiebot' ); ?>
42 </label>
43 </div>
44 </div>
45 </div>
46
47 <?php if ( $vendor_data ) : ?>
48 <?php foreach ( $vendor_data as $name => $data ) : ?>
49 <?php if ( $name !== 'vendors' ) : ?>
50 <?php $item_attribute = Iab_Page::get_option_attribute_name( $name ); ?>
51 <div class="cb-settings__vendor__config__item">
52 <div class="cb-settings__config__content">
53 <h3 class="cb-settings__config__subtitle">
54 <?php echo esc_html( $data['title'] ); ?>
55 </h3>
56 <p class="cb-general__info__text"><?php echo esc_html( $data['description'] ); ?></p>
57 </div>
58 <div class="cb-settings__config__data">
59 <div class="cb-settings__config__data__inner">
60 <div class="vendor-selected-items search-list">
61 <?php foreach ( $data['items'] as $item ) : ?>
62 <label class="switch-checkbox" for="cookiebot-<?php echo esc_attr( $item_attribute ); ?>-<?php echo esc_attr( $item['id'] ); ?>">
63 <input
64 type="checkbox"
65 name="cookiebot-tcf-<?php echo esc_attr( $item_attribute ); ?>[]"
66 id="cookiebot-<?php echo esc_attr( $item_attribute ); ?>-<?php echo esc_attr( $item['id'] ); ?>"
67 value="<?php echo esc_attr( $item['id'] ); ?>"
68 <?php echo $iab_page->vendor_checked( $item['id'], $data['selected'] ) ? 'checked' : ''; ?>>
69 <div class="switcher"></div>
70 <?php echo esc_html( $iab_page->return_translation_value( $name, $item ) ); ?>
71 </label>
72 <?php endforeach; ?>
73 </div>
74 </div>
75 </div>
76 </div>
77 <?php endif; ?>
78 <?php endforeach; ?>
79 <?php else : ?>
80 <div class="cb-settings__vendor__config__item vendor-list-offline">
81 <div class="cb-settings__config__content">
82 <h3 class="cb-settings__config__subtitle">
83 <?php echo esc_html_e( 'IAB vendor list is temporarily offline. Please try refreshing the page after a couple of minutes.', 'cookiebot' ); ?>
84 </h3>
85 <p class="cb-general__info__text"><?php echo esc_html_e( 'If you had previously saved configurations, don’t worry, they will continue to work.', 'cookiebot' ); ?></p>
86 </div>
87 </div>
88 <?php
89 //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
90 echo Iab_Page::get_backup_custom_option( 'cookiebot-tcf-purposes', $custom_tcf_purposes );
91 //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
92 echo Iab_Page::get_backup_custom_option( 'cookiebot-tcf-special-purposes', $custom_tcf_special_purposes );
93 //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
94 echo Iab_Page::get_backup_custom_option( 'cookiebot-tcf-features', $custom_tcf_features );
95 //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
96 echo Iab_Page::get_backup_custom_option( 'cookiebot-tcf-special-features', $custom_tcf_special_features );
97 //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
98 echo Iab_Page::get_backup_custom_option( 'cookiebot-tcf-vendors', $custom_tcf_vendors );
99 //phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
100 echo Iab_Page::get_backup_custom_restrictions( $custom_tcf_restrictions );
101 ?>
102 <?php endif; ?>
103
104 <?php if ( ( $vendor_data && $vendor_data['vendors'] ) || $extra_providers ) : ?>
105 <div class="cb-settings__vendor__config__item">
106 <div class="cb-settings__config__content">
107 <h3 class="cb-settings__config__subtitle">
108 <?php esc_html_e( 'Sharing data with third-party vendors', 'cookiebot' ); ?>
109 </h3>
110 <p class="cb-general__info__text">
111 <?php
112 esc_html_e( 'Select vendors with whom you’ll share users’ data. We’ll include this information on the second layer of your consent banner, where users interested in more granular detail about who will access their data can view it.', 'cookiebot' );
113 ?>
114 </p>
115 </div>
116 </div>
117 <?php endif; ?>
118
119
120 <?php if ( $vendor_data && $vendor_data['vendors'] ) : ?>
121 <?php $item_attribute = Iab_Page::get_option_attribute_name( 'vendors' ); ?>
122 <div class="cb-settings__vendor__config__item">
123 <div class="cb-settings__config__content">
124 <h3 class="cb-settings__config__subtitle only-title">
125 <?php echo esc_html( $vendor_data['vendors']['title'] ); ?>
126 </h3>
127 </div>
128 <div class="cb-settings__config__data">
129 <div class="cb-settings__config__data__inner cb-vendor-settings">
130 <input type="text" class="cb-settings__selector-search checkbox-vendor-search" placeholder="<?php esc_html_e( 'Search', 'cookiebot' ); ?>...">
131 <div class="cb-settings__selector-all cb-btn cb-main-btn"><?php esc_html_e( 'Select All', 'cookiebot' ); ?></div>
132 <div class="cb-settings__selector-none cb-btn cb-white-btn"><?php esc_html_e( 'Deselect All', 'cookiebot' ); ?></div>
133 <div class="vendor-selected-items-message hidden"><span><?php esc_html_e( 'Select at least one vendor', 'cookiebot' ); ?></span></div>
134 <div class="vendor-selected-items search-list">
135 <?php foreach ( $vendor_data['vendors']['items'] as $item ) : ?>
136 <label class="switch-checkbox" for="cookiebot-<?php echo esc_attr( $item_attribute ); ?>-<?php echo esc_attr( $item['id'] ); ?>">
137 <input
138 type="checkbox"
139 name="cookiebot-tcf-<?php echo esc_attr( $item_attribute ); ?>[]"
140 id="cookiebot-<?php echo esc_attr( $item_attribute ); ?>-<?php echo esc_attr( $item['id'] ); ?>"
141 value="<?php echo esc_attr( $item['id'] ); ?>"
142 <?php echo $iab_page->vendor_checked( $item['id'], $vendor_data['vendors']['selected'] ) ? 'checked' : ''; ?>>
143 <div class="switcher"></div>
144 <?php echo esc_html( $iab_page->return_translation_value( 'vendors', $item ) ); ?>
145 </label>
146 <?php endforeach; ?>
147 </div>
148 </div>
149 </div>
150 </div>
151 <?php endif; ?>
152
153 <?php if ( $extra_providers ) : ?>
154 <div class="cb-settings__vendor__config__item">
155 <div class="cb-settings__config__content">
156 <h3 class="cb-settings__config__subtitle only-title">
157 <?php esc_html_e( 'Google Ads certified external vendors', 'cookiebot' ); ?>
158 </h3>
159 </div>
160 <div class="cb-settings__config__data">
161 <div class="cb-settings__config__data__inner cb-vendor-settings">
162 <input type="text" class="cb-settings__selector-search checkbox-vendor-search" placeholder="<?php esc_html_e( 'Search', 'cookiebot' ); ?>...">
163 <div class="cb-settings__selector-all cb-btn cb-main-btn"><?php esc_html_e( 'Select All', 'cookiebot' ); ?></div>
164 <div class="cb-settings__selector-none cb-btn cb-white-btn"><?php esc_html_e( 'Deselect All', 'cookiebot' ); ?></div>
165 <div class="vendor-selected-items search-list">
166 <?php foreach ( $extra_providers as $item ) : ?>
167 <label class="switch-checkbox" for="cookiebot-ac-vendor<?php echo esc_attr( $item['id'] ); ?>">
168 <input
169 type="checkbox"
170 name="cookiebot-tcf-ac-vendors[]"
171 id="cookiebot-ac-vendor<?php echo esc_attr( $item['id'] ); ?>"
172 value="<?php echo esc_attr( $item['id'] ); ?>"
173 <?php echo $iab_page->vendor_checked( $item['id'], $custom_tcf_ac_vendors ) ? 'checked' : ''; ?>>
174 <div class="switcher"></div>
175 <?php echo esc_html( $item['name'] ); ?>
176 </label>
177 <?php endforeach; ?>
178 </div>
179 </div>
180 </div>
181 </div>
182 <?php endif; ?>
183 <?php if ( $vendor_data ) : ?>
184
185 <div class="cb-settings__vendor__config__item">
186 <div class="cb-settings__config__content">
187 <h3 class="cb-settings__config__subtitle">
188 <?php esc_html_e( 'Restrictions of data use purposes for vendors', 'cookiebot' ); ?>
189 </h3>
190 <p class="cb-general__info__text">
191 <?php
192 esc_html_e(
193 'Set restrictions on data use purposes for specific vendors. Add vendors and the data use purposes that each vendor is allowed. We’ll share this information with users within your consent banner.',
194 'cookiebot'
195 );
196 ?>
197 </p>
198 <div class="cb-btn cb-main-btn restriction-vendor-add"><?php esc_html_e( 'Add Vendor', 'cookiebot' ); ?></div>
199 </div>
200 <?php
201 foreach ( $custom_tcf_restrictions as $vendor => $settings ) :
202 $select_name_attr = $vendor !== 0 ? 'cookiebot-tcf-disallowed[' . $vendor . ']' : '';
203 $vendors_list = $vendor_data['vendors'];
204 $selector_placeholder = __( 'Select Vendor', 'cookiebot' );
205 foreach ( $vendors_list['items'] as $item ) {
206 if ( $item['id'] === $vendor ) {
207 $selector_placeholder = $item['name'];
208 }
209 }
210 ?>
211 <div class="cb-settings__config__data cb-settings__vendor__restrictions">
212 <div class="cb-settings__config__data__inner">
213 <div class="cb-settings__selector__container">
214 <input type="hidden" name="<?php echo esc_html( $select_name_attr ); ?>" class="cb-settings__selector__container-input">
215 <div class="cb-settings__selector-selector" data-placeholder="<?php esc_attr_e( 'Select Vendor', 'cookiebot' ); ?>"><?php echo esc_html( $selector_placeholder ); ?></div>
216 <div class="cb-settings__selector-list-container hidden">
217 <div class="cb-settings__selector-veil"></div>
218 <input type="text" class="cb-settings__selector-search" placeholder="<?php esc_html_e( 'Search', 'cookiebot' ); ?>...">
219 <div class="cb-settings__selector-list search-list">
220 <?php foreach ( $vendors_list['items'] as $item ) : ?>
221 <div
222 data-value="<?php echo esc_attr( $item['id'] ); ?>"
223 class="cb-settings__selector-list-item <?php echo $item['id'] === $vendor ? 'selected' : ''; ?>"><?php echo esc_html( $item['name'] ); ?></div>
224 <?php endforeach; ?>
225 </div>
226 </div>
227 </div>
228 <div class="cb-btn cb-main-btn vendor-purposes-show"><?php esc_html_e( 'Set Purposes', 'cookiebot' ); ?></div>
229 <div class="remove__restriction dashicons dashicons-dismiss"></div>
230 </div>
231 <div class="vendor-purposes-restrictions hidden">
232 <?php
233 foreach ( $vendor_data as $name => $data ) :
234 if ( $name === 'purposes' ) :
235 ?>
236 <div class="cb-settings__config__data__inner">
237 <div class="vendor-selected-items">
238 <?php foreach ( $data['items'] as $item ) : ?>
239
240 <?php
241 $item_attribute = str_replace( '_', '-', $name );
242 $item_name = $vendor !== 0 ? 'cookiebot-tcf-disallowed[' . $vendor . '][purposes][]' : '';
243 $item_id = 'cookiebot-vendor' . $vendor . '-' . $item_attribute . $item['id'];
244 ?>
245
246 <label class="switch-checkbox" for="<?php echo esc_html( $item_id ); ?>">
247 <input
248 type="checkbox"
249 name="<?php echo esc_attr( $item_name ); ?>"
250 id="<?php echo esc_html( $item_id ); ?>"
251 class="purpose-item"
252 value="<?php echo esc_attr( $item['id'] ); ?>"
253 <?php echo $iab_page->vendor_checked( $item['id'], $settings['purposes'] ) ? 'checked' : ''; ?>>
254
255 <div class="switcher"></div>
256 <?php echo esc_html( $iab_page->return_translation_value( $name, $item ) ); ?>
257 </label>
258 <?php endforeach; ?>
259 </div>
260 </div>
261 <?php
262 endif;
263 endforeach;
264 ?>
265 </div>
266 </div>
267 <?php endforeach; ?>
268 </div>
269 <?php endif; ?>
270