additional-page.php
10 months ago
embeddings-page.php
1 year ago
gcm-page.php
1 year ago
general-page.php
10 months ago
gtm-page.php
1 year ago
general-page.php
269 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var string $cbid |
| 4 | * @var bool $is_ms |
| 5 | * @var string $network_cbid |
| 6 | * @var bool $network_cbid_override |
| 7 | * @var string $ruleset_id |
| 8 | * @var bool $cookiebot_iab |
| 9 | * @var string $network_scrip_tag_uc_attr |
| 10 | * @var string $cookie_blocking_mode |
| 11 | * @var bool $network_auto |
| 12 | */ |
| 13 | |
| 14 | use cybot\cookiebot\lib\Cookiebot_WP; |
| 15 | use function cybot\cookiebot\lib\include_view; |
| 16 | |
| 17 | // Check if user was onboarded via signup |
| 18 | $was_onboarded = Cookiebot_WP::was_onboarded_via_signup() && ! empty( Cookiebot_WP::get_auth_token() ); |
| 19 | |
| 20 | ?> |
| 21 | <?php include_view( 'admin/common/templates/extra/cbid-disconnect-alert.php' ); ?> |
| 22 | <?php |
| 23 | if ( ! empty( $network_cbid ) ) { |
| 24 | include_view( 'admin/common/templates/extra/subsite-disconnect-alert.php' ); |
| 25 | } |
| 26 | ?> |
| 27 | |
| 28 | <?php if ( $was_onboarded ) : ?> |
| 29 | <div class="cb-settings__notabs"> |
| 30 | </div> |
| 31 | <?php endif; ?> |
| 32 | |
| 33 | <div class="cb-settings__config__item cb-settings__config__cbid"> |
| 34 | <div class="cb-settings__config__content"> |
| 35 | <h3 class="cb-settings__config__subtitle"> |
| 36 | <?php esc_html_e( 'Disconnecting your banner setup?', 'cookiebot' ); ?> |
| 37 | </h3> |
| 38 | <p class="cb-general__info__text"> |
| 39 | <?php esc_html_e( 'Click', 'cookiebot' ); ?> |
| 40 | <strong><?php esc_html_e( 'Disconnect account', 'cookiebot' ); ?></strong> |
| 41 | <?php esc_html_e( 'to remove this cookie banner from your site. You can add it back at any time using the same ID or a new one.', 'cookiebot' ); ?> |
| 42 | </p> |
| 43 | <p class="cb-general__info__text"> |
| 44 | <?php esc_html_e( 'Since you signed up through the plugin, disconnecting will remove your login access and clear your plugin data. But don\'t worry, you can still use your ID by copying and pasting it from the Admin Interface.', 'cookiebot' ); ?> |
| 45 | </p> |
| 46 | |
| 47 | <?php if ( $was_onboarded ) : ?> |
| 48 | <p class="cb-general__info__text"> |
| 49 | <?php esc_html_e( 'Need more control over your banner?', 'cookiebot' ); ?> |
| 50 | <a href="https://admin.usercentrics.eu/#/v3/configuration/setup?settingsId=<?php echo esc_attr( $cbid ); ?>" |
| 51 | target="_blank" class="cb-btn cb-link-btn" rel="noopener"> |
| 52 | <?php esc_html_e( 'Go to full banner settings', 'cookiebot' ); ?> |
| 53 | </a> |
| 54 | </p> |
| 55 | <?php else : ?> |
| 56 | <a href="https://support.usercentrics.com/hc/en-us/articles/18097606499100-What-is-a-Settings-ID-and-where-can-I-find-it" |
| 57 | target="_blank" class="cb-btn cb-link-btn" rel="noopener"> |
| 58 | <?php esc_html_e( 'Where to find settings ID', 'cookiebot' ); ?> |
| 59 | </a> |
| 60 | |
| 61 | <?php endif; ?> |
| 62 | </div> |
| 63 | <div class="cb-settings__config__data"> |
| 64 | <div class="cb-settings__config__data__inner"> |
| 65 | <h3 class="cb-settings__data__subtitle"> |
| 66 | <?php esc_html_e( 'Your settings ID', 'cookiebot' ); ?> |
| 67 | </h3> |
| 68 | <div class="cookiebot-cbid-container"> |
| 69 | <div class="cookiebot-cbid-input"> |
| 70 | <input |
| 71 | <?php |
| 72 | echo ( $is_ms ) ? |
| 73 | ' placeholder="' . esc_attr( $network_cbid ) . '" data-network="' . esc_attr( $network_cbid ) . '"' : |
| 74 | ''; |
| 75 | ?> |
| 76 | type="text" id="cookiebot-cbid" class="cbid-active" name="cookiebot-cbid" |
| 77 | value="<?php echo esc_attr( $cbid ); ?>"/> |
| 78 | <div class="cookiebot-cbid-check"></div> |
| 79 | </div> |
| 80 | <div id="cookiebot-cbid-reset-dialog" |
| 81 | class="cb-btn cb-main-btn |
| 82 | <?php |
| 83 | if ( ! empty( $network_cbid ) && ! $network_cbid_override ) { |
| 84 | echo 'hidden'; |
| 85 | } |
| 86 | ?> |
| 87 | "><?php esc_html_e( 'Disconnect account', 'cookiebot' ); ?></div> |
| 88 | <?php if ( $is_ms ) : ?> |
| 89 | <div id="cookiebot-cbid-network-dialog" |
| 90 | class="cb-btn cb-white-btn |
| 91 | <?php |
| 92 | if ( ! empty( $network_cbid ) && $network_cbid_override ) { |
| 93 | echo 'hidden'; |
| 94 | } |
| 95 | ?> |
| 96 | "><?php esc_html_e( 'Using network account', 'cookiebot' ); ?></div> |
| 97 | <?php submit_button( esc_html__( 'Connect account', 'cookiebot' ), 'hidden' ); ?> |
| 98 | <?php endif; ?> |
| 99 | </div> |
| 100 | <?php if ( ! empty( $network_cbid ) ) : ?> |
| 101 | <div id="cb-network-id-override"> |
| 102 | <label class="switch-checkbox" for="cookiebot-cbid-override"> |
| 103 | <input class=" |
| 104 | <?php |
| 105 | if ( ! $network_cbid_override ) { |
| 106 | echo 'cb-no-network'; |
| 107 | } |
| 108 | ?> |
| 109 | " |
| 110 | type="checkbox" name="cookiebot-cbid-override" id="cookiebot-cbid-override" value="1" |
| 111 | <?php checked( 1, $network_cbid_override ); ?>> |
| 112 | <div class="switcher"></div> |
| 113 | <?php esc_html_e( 'Do not use Network Settings ID', 'cookiebot' ); ?> |
| 114 | </label> |
| 115 | </div> |
| 116 | <?php endif; ?> |
| 117 | </div> |
| 118 | </div> |
| 119 | </div> |
| 120 | |
| 121 | <?php if ( ! $was_onboarded ) : ?> |
| 122 | <div id="cookiebot-ruleset-id-selector" class="cb-settings__config__item hidden"> |
| 123 | <div class="cb-settings__config__content"> |
| 124 | <p class="cb-general__info__text"> |
| 125 | <?php esc_html_e( 'Let us know if your account is set for compliance with a single privacy law (e.g. GDPR) or multiple laws (e.g. GDPR and CCPA) based on user’s location. The default is a single privacy law, so this is likely your setting unless modified.', 'cookiebot' ); ?> |
| 126 | </p> |
| 127 | </div> |
| 128 | <div class="cb-settings__config__data"> |
| 129 | <div class="cb-settings__config__data__inner"> |
| 130 | <h3 class="cb-settings__data__subtitle"> |
| 131 | <?php esc_html_e( 'Your current account setup:', 'cookiebot' ); ?> |
| 132 | </h3> |
| 133 | <label class="recommended-item"> |
| 134 | <input <?php checked( 'settings', $ruleset_id ); ?> |
| 135 | type="radio" |
| 136 | name="cookiebot-ruleset-id" |
| 137 | value="settings"/> |
| 138 | <?php esc_html_e( 'Compliance with one privacy law', 'cookiebot' ); ?> |
| 139 | </label> |
| 140 | <label> |
| 141 | <input <?php checked( 'ruleset', $ruleset_id ); ?> |
| 142 | type="radio" |
| 143 | name="cookiebot-ruleset-id" |
| 144 | value="ruleset"/> |
| 145 | <?php esc_html_e( 'Compliance with multiple privacy laws (geolocation)', 'cookiebot' ); ?> |
| 146 | </label> |
| 147 | </div> |
| 148 | </div> |
| 149 | </div> |
| 150 | <?php endif; ?> |
| 151 | |
| 152 | <?php if ( ! $was_onboarded ) : ?> |
| 153 | <div class="cb-settings__config__item"> |
| 154 | <div class="cb-settings__config__content"> |
| 155 | <h3 class="cb-settings__config__subtitle"> |
| 156 | <?php esc_html_e( 'TCF integration', 'cookiebot' ); ?> |
| 157 | </h3> |
| 158 | <p class="cb-general__info__text"> |
| 159 | <?php esc_html_e( 'Enable the integration with the latest version of IAB TCF.', 'cookiebot' ); ?> |
| 160 | </p> |
| 161 | </div> |
| 162 | <div class="cb-settings__config__data"> |
| 163 | <div class="cb-settings__config__data__inner"> |
| 164 | <label class="switch-checkbox" for="cookiebot-iab"> |
| 165 | <input type="checkbox" name="cookiebot-iab" id="cookiebot-iab" value="1" |
| 166 | <?php checked( 1, $cookiebot_iab ); ?>> |
| 167 | <div class="switcher"></div> |
| 168 | <?php esc_html_e( 'IAB TCF integration', 'cookiebot' ); ?> |
| 169 | </label> |
| 170 | </div> |
| 171 | </div> |
| 172 | </div> |
| 173 | <?php endif; ?> |
| 174 | |
| 175 | <?php if ( ! $was_onboarded ) : ?> |
| 176 | <div class="cb-settings__config__item"> |
| 177 | <div class="cb-settings__config__content"> |
| 178 | <h3 class="cb-settings__config__subtitle"> |
| 179 | <?php esc_html_e( 'Cookie-blocking', 'cookiebot' ); ?> |
| 180 | </h3> |
| 181 | <p class="cb-general__info__text"> |
| 182 | <?php esc_html_e( 'Choose the type of your cookie-blocking mode. Select automatic to automatically block all cookies except those strictly necessary to use before user gives consent. Manual mode lets you adjust your cookie settings within your website’s HTML.', 'cookiebot' ); ?> |
| 183 | </p> |
| 184 | <a href="https://support.usercentrics.com/hc/en-us/articles/17332104757148-Automatic-Data-Processing-Service-blocking" |
| 185 | target="_blank" class="cb-btn cb-link-btn" rel="noopener"> |
| 186 | <?php esc_html_e( 'Learn more', 'cookiebot' ); ?> |
| 187 | </a> |
| 188 | </div> |
| 189 | <div class="cb-settings__config__data"> |
| 190 | <div class="cb-settings__config__data__inner"> |
| 191 | <h3 class="cb-settings__data__subtitle"> |
| 192 | <?php esc_html_e( 'Select cookie-blocking mode', 'cookiebot' ); ?> |
| 193 | </h3> |
| 194 | <label class="recommended-item"> |
| 195 | <input <?php checked( 'auto', $cookie_blocking_mode ); ?> |
| 196 | type="radio" |
| 197 | name="cookiebot-cookie-blocking-mode" |
| 198 | value="auto" |
| 199 | /> |
| 200 | <?php esc_html_e( 'Automatic', 'cookiebot' ); ?> |
| 201 | <span class="recommended-tag"><?php esc_html_e( 'Recommended', 'cookiebot' ); ?></span> |
| 202 | </label> |
| 203 | <label> |
| 204 | <input <?php checked( 'manual', $cookie_blocking_mode ); ?> |
| 205 | type="radio" |
| 206 | name="cookiebot-cookie-blocking-mode" |
| 207 | value="manual" |
| 208 | /> |
| 209 | <?php esc_html_e( 'Manual', 'cookiebot' ); ?> |
| 210 | </label> |
| 211 | </div> |
| 212 | </div> |
| 213 | </div> |
| 214 | <?php endif; ?> |
| 215 | |
| 216 | <?php |
| 217 | $cv = get_option( 'cookiebot-script-tag-uc-attribute', 'async' ); |
| 218 | $disabled = false; |
| 219 | if ( $is_ms && $network_scrip_tag_uc_attr !== 'custom' ) { |
| 220 | $disabled = true; |
| 221 | $cv = $network_scrip_tag_uc_attr; |
| 222 | } |
| 223 | $auto_disabled = $cookie_blocking_mode === 'auto' ? ' disabled__item' : ''; |
| 224 | ?> |
| 225 | |
| 226 | <div class="cb-settings__config__item secondary__item<?php echo esc_attr( $auto_disabled ); ?>" id="cookie-popup"> |
| 227 | <div class="cb-settings__config__content"> |
| 228 | <h3 class="cb-settings__config__subtitle"> |
| 229 | <?php esc_html_e( 'Hide cookie popup', 'cookiebot' ); ?> |
| 230 | </h3> |
| 231 | <p class="cb-general__info__note"> |
| 232 | <?php esc_html_e( 'This feature is only available when using Manual Blocking', 'cookiebot' ); ?> |
| 233 | </p> |
| 234 | <p class="cb-general__info__text"> |
| 235 | <?php esc_html_e( 'This will remove the cookie consent banner from your website. The cookie declaration shortcode will still be available if you are using Google Tag Manager (or equal), you need to add the Cookiebot script in your Tag Manager.', 'cookiebot' ); ?> |
| 236 | </p> |
| 237 | </div> |
| 238 | <div class="cb-settings__config__data"> |
| 239 | <div class="cb-settings__config__data__inner"> |
| 240 | <label> |
| 241 | <?php |
| 242 | $disabled = false; |
| 243 | if ( $is_ms && get_site_option( 'cookiebot-nooutput' ) || $is_ms && $network_auto ) { |
| 244 | $disabled = true; |
| 245 | if ( ! $network_auto ) { |
| 246 | echo '<input type="checkbox" checked disabled />'; |
| 247 | } else { |
| 248 | echo '<input type="checkbox" disabled />'; |
| 249 | } |
| 250 | } else { |
| 251 | ?> |
| 252 | <input type="checkbox" name="cookiebot-nooutput" value="1" |
| 253 | <?php |
| 254 | checked( |
| 255 | 1, |
| 256 | get_option( 'cookiebot-nooutput', false ) |
| 257 | ); |
| 258 | ?> |
| 259 | /> |
| 260 | <?php } ?> |
| 261 | <?php esc_html_e( 'Hide the cookie popup banner', 'cookiebot' ); ?> |
| 262 | </label> |
| 263 | <?php if ( $is_ms && get_site_option( 'cookiebot-nooutput' ) || $is_ms && $network_auto ) { ?> |
| 264 | <p class="cb-general__info__note"><?php esc_html_e( 'Disabled by active setting in Network Settings', 'cookiebot' ); ?></p> |
| 265 | <?php } ?> |
| 266 | </div> |
| 267 | </div> |
| 268 | </div> |
| 269 |