| 1 |
<?php |
| 2 |
/** |
| 3 |
* @var bool $is_ms |
| 4 |
* @var string $network_scrip_tag_cd_attr |
| 5 |
*/ |
| 6 |
?> |
| 7 |
<div class="cb-settings__config__item"> |
| 8 |
<div class="cb-settings__config__content"> |
| 9 |
<h3 class="cb-settings__config__subtitle"> |
| 10 |
<?php esc_html_e( 'Automatic updates', 'cookiebot' ); ?> |
| 11 |
</h3> |
| 12 |
<p class="cb-general__info__text"> |
| 13 |
<?php esc_html_e( 'Enable automatic updates whenever we release a new version of the plugin.', 'cookiebot' ); ?> |
| 14 |
</p> |
| 15 |
</div> |
| 16 |
<div class="cb-settings__config__data"> |
| 17 |
<div class="cb-settings__config__data__inner"> |
| 18 |
<label class="switch-checkbox" for="cookiebot-autoupdate"> |
| 19 |
<input id="cookiebot-autoupdate" type="checkbox" name="cookiebot-autoupdate" value="1" |
| 20 |
<?php |
| 21 |
checked( |
| 22 |
1, |
| 23 |
get_option( 'cookiebot-autoupdate', false ) |
| 24 |
); |
| 25 |
?> |
| 26 |
/> |
| 27 |
<div class="switcher"></div> |
| 28 |
<?php esc_html_e( 'Automatically update to new version', 'cookiebot' ); ?> |
| 29 |
</label> |
| 30 |
</div> |
| 31 |
</div> |
| 32 |
</div> |
| 33 |
|
| 34 |
<div class="cb-settings__config__item"> |
| 35 |
<div class="cb-settings__config__content"> |
| 36 |
<h3 class="cb-settings__config__subtitle"> |
| 37 |
<?php esc_html_e( 'Show banner on site', 'cookiebot' ); ?> |
| 38 |
</h3> |
| 39 |
<p class="cb-general__info__text"> |
| 40 |
<?php esc_html_e( 'You can choose to display or hide the consent banner on your website.', 'cookiebot' ); ?> |
| 41 |
</p> |
| 42 |
</div> |
| 43 |
<div class="cb-settings__config__data"> |
| 44 |
<div class="cb-settings__config__data__inner"> |
| 45 |
<label class="switch-checkbox" for="cookiebot-banner-enabled"> |
| 46 |
<?php |
| 47 |
$disabled = false; |
| 48 |
if ( $is_ms && get_site_option( 'cookiebot-banner-enabled' ) ) { |
| 49 |
echo '<input type="checkbox" checked disabled />'; |
| 50 |
$disabled = true; |
| 51 |
} else { |
| 52 |
?> |
| 53 |
<input id="cookiebot-banner-enabled" type="checkbox" |
| 54 |
name="cookiebot-banner-enabled" value="1" |
| 55 |
<?php |
| 56 |
checked( |
| 57 |
1, |
| 58 |
get_option( 'cookiebot-banner-enabled', '1' ) |
| 59 |
); |
| 60 |
?> |
| 61 |
/> |
| 62 |
<?php |
| 63 |
} |
| 64 |
?> |
| 65 |
<div class="switcher"></div> |
| 66 |
<?php esc_html_e( 'Show banner on site', 'cookiebot' ); ?> |
| 67 |
</label> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
</div> |
| 71 |
|
| 72 |
<div class="cb-settings__config__item"> |
| 73 |
<div class="cb-settings__config__content"> |
| 74 |
<h3 class="cb-settings__config__subtitle"> |
| 75 |
<?php esc_html_e( 'Cookie declaration script tag:', 'cookiebot' ); ?> |
| 76 |
</h3> |
| 77 |
<p class="cb-general__info__text"> |
| 78 |
<?php esc_html_e( 'If you implemented the declaration on your page through our widget in WordPress, you can choose here how the script should be loaded.', 'cookiebot' ); ?> |
| 79 |
</p> |
| 80 |
</div> |
| 81 |
<div class="cb-settings__config__data"> |
| 82 |
<div class="cb-settings__config__data__inner"> |
| 83 |
<h3 class="cb-settings__data__subtitle"> |
| 84 |
<?php esc_html_e( 'Select the cookie declaration script loading setting', 'cookiebot' ); ?> |
| 85 |
</h3> |
| 86 |
<?php |
| 87 |
$cv = get_option( 'cookiebot-script-tag-cd-attribute', 'async' ); |
| 88 |
$disabled = false; |
| 89 |
if ( $is_ms && $network_scrip_tag_cd_attr !== 'custom' ) { |
| 90 |
$disabled = true; |
| 91 |
$cv = $network_scrip_tag_cd_attr; |
| 92 |
} |
| 93 |
?> |
| 94 |
<label> |
| 95 |
<input |
| 96 |
type="radio" |
| 97 |
name="cookiebot-script-tag-cd-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?> |
| 98 |
value="" <?php checked( '', $cv ); ?>/> |
| 99 |
<?php esc_html_e( 'None', 'cookiebot' ); ?> |
| 100 |
</label> |
| 101 |
<label> |
| 102 |
<input |
| 103 |
type="radio" |
| 104 |
name="cookiebot-script-tag-cd-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?> |
| 105 |
value="async" <?php checked( 'async', $cv ); ?>/> |
| 106 |
async |
| 107 |
</label> |
| 108 |
<label> |
| 109 |
<input |
| 110 |
type="radio" |
| 111 |
name="cookiebot-script-tag-cd-attribute"<?php echo ( $disabled ) ? ' disabled' : ''; ?> |
| 112 |
value="defer" <?php checked( 'defer', $cv ); ?>/> |
| 113 |
defer |
| 114 |
</label> |
| 115 |
<?php if ( $disabled ) { ?> |
| 116 |
<p class="cb-general__info__note"><?php esc_html_e( 'Disabled by active setting in Network Settings', 'cookiebot' ); ?></p> |
| 117 |
<?php } ?> |
| 118 |
</div> |
| 119 |
</div> |
| 120 |
</div> |
| 121 |
|
| 122 |
<div class="cb-settings__config__item"> |
| 123 |
<div class="cb-settings__config__content"> |
| 124 |
<h3 class="cb-settings__config__subtitle"> |
| 125 |
<?php esc_html_e( 'Ignore scripts in queue from Cookiebot CMP scan:', 'cookiebot' ); ?> |
| 126 |
</h3> |
| 127 |
<p class="cb-general__info__text"> |
| 128 |
<?php esc_html_e( 'List scripts source URL (one per line) from the queue to ignore Cookiebot CMP scan. Partial source URL will also work, e.g. wp-content/plugins/woocommerce will block every WooCommerce script.', 'cookiebot' ); ?> |
| 129 |
</p> |
| 130 |
<p class="cb-general__info__text"> |
| 131 |
<?php esc_html_e( 'This feature only works for scripts loaded via wp_enqueue_script. Manually added scripts must be manually edited.', 'cookiebot' ); ?> |
| 132 |
</p> |
| 133 |
</div> |
| 134 |
<div class="cb-settings__config__data"> |
| 135 |
<div class="cb-settings__config__data__inner"> |
| 136 |
<h3 class="cb-settings__data__subtitle"> |
| 137 |
<?php esc_html_e( 'Script source URL:', 'cookiebot' ); ?> |
| 138 |
</h3> |
| 139 |
<textarea |
| 140 |
name="cookiebot-ignore-scripts" |
| 141 |
rows="4" |
| 142 |
cols="50" |
| 143 |
placeholder="<?php esc_attr_e( 'Add script source URL, one per line', 'cookiebot' ); ?>" |
| 144 |
><?php echo esc_html( get_option( 'cookiebot-ignore-scripts', false ) ); ?></textarea> |
| 145 |
</div> |
| 146 |
</div> |
| 147 |
</div> |
| 148 |
|