tab.php
141 lines
| 1 | <?php |
| 2 | /** |
| 3 | * @var bool $is_wp_consent_api_active |
| 4 | * @var array $m_default |
| 5 | * @var array $m |
| 6 | */ |
| 7 | |
| 8 | use cybot\cookiebot\addons\config\Settings_Config; |
| 9 | |
| 10 | ?> |
| 11 | <div class="cb-addons__tab__header"> |
| 12 | <div class="cb-addons__header__column--inner"> |
| 13 | <div class="cb-addons__header__column submit-column"> |
| 14 | <h2 class="cb-addons__tab__subtitle"><?php esc_html_e( 'Remember to save your changes before switching tabs', 'cookiebot' ); ?></h2> |
| 15 | </div> |
| 16 | </div> |
| 17 | </div> |
| 18 | |
| 19 | |
| 20 | <?php if ( $is_wp_consent_api_active ) { ?> |
| 21 | <h3 id="consent_level_api_settings_title" class="cookiebot_fieldset_header"> |
| 22 | <?php |
| 23 | esc_html_e( |
| 24 | 'WP Consent API Settings', |
| 25 | 'cookiebot' |
| 26 | ); |
| 27 | ?> |
| 28 | </h3> |
| 29 | <div id="consent_level_api_settings"> |
| 30 | <p> |
| 31 | <?php |
| 32 | esc_html_e( |
| 33 | 'WP Consent API and Usercentrics Cookiebot WordPress Plugin categorize cookies a bit differently. The default settings should fit most needs, but if you need to change the mapping you can do so below.', |
| 34 | 'cookiebot' |
| 35 | ); |
| 36 | ?> |
| 37 | </p> |
| 38 | <table class="cb-settings__consent__mapping-table uc-consent-table" |
| 39 | aria-describedby="consent_level_api_settings_title"> |
| 40 | <thead> |
| 41 | <tr> |
| 42 | <th></th> |
| 43 | <th></th> |
| 44 | </tr> |
| 45 | </thead> |
| 46 | <tbody> |
| 47 | <tr> |
| 48 | <td class="cb-settings__data__head"> |
| 49 | <h3 class="cb-settings__data__subtitle"><?php esc_html_e( 'Usercentrics Cookiebot cookie categories', 'cookiebot' ); ?></h3> |
| 50 | </td> |
| 51 | <td class="cb-settings__data__head"> |
| 52 | <h3 class="cb-settings__data__subtitle"><?php esc_html_e( 'WP Consent API cookies categories equivalent', 'cookiebot' ); ?></h3> |
| 53 | </td> |
| 54 | </tr> |
| 55 | <tr> |
| 56 | <td> |
| 57 | <div class="cb_consent"> |
| 58 | <span class="uc_categories"> |
| 59 | <?php esc_html_e( 'essential', 'cookiebot' ); ?> |
| 60 | </span> |
| 61 | </div> |
| 62 | </td> |
| 63 | <td> |
| 64 | <div class="consent_mapping"> |
| 65 | <input type="text" disabled value="Functional"> |
| 66 | </div> |
| 67 | </td> |
| 68 | </tr> |
| 69 | <tr> |
| 70 | <td> |
| 71 | <div class="cb_consent"> |
| 72 | <span class="uc_categories"> |
| 73 | <?php esc_html_e( 'functional', 'cookiebot' ); ?> |
| 74 | </span> |
| 75 | </div> |
| 76 | </td> |
| 77 | <td> |
| 78 | <div class="consent_mapping"> |
| 79 | <select class="cb-category-selectors" name="cookiebot-uc-consent-mapping[functional]" |
| 80 | id="cookiebot-uc-consent-mapping-functional" data-default="preferences"> |
| 81 | <?php |
| 82 | echo wp_kses( |
| 83 | Settings_Config::get_wp_consent_values( 'functional', $m ), |
| 84 | array( |
| 85 | 'option' => array( |
| 86 | 'selected' => true, |
| 87 | 'value' => array(), |
| 88 | ), |
| 89 | ) |
| 90 | ); |
| 91 | ?> |
| 92 | </select> |
| 93 | </div> |
| 94 | </td> |
| 95 | </tr> |
| 96 | <tr> |
| 97 | <td> |
| 98 | <div class="cb_consent"> |
| 99 | <span class="uc_categories"> |
| 100 | <?php esc_html_e( 'marketing', 'cookiebot' ); ?> |
| 101 | </span> |
| 102 | </div> |
| 103 | </td> |
| 104 | <td> |
| 105 | <div class="consent_mapping"> |
| 106 | <select class="cb-category-selectors" name="cookiebot-uc-consent-mapping[marketing]" |
| 107 | id="cookiebot-uc-consent-mapping-marketing" data-default="marketing"> |
| 108 | <?php |
| 109 | echo wp_kses( |
| 110 | Settings_Config::get_wp_consent_values( 'marketing', $m ), |
| 111 | array( |
| 112 | 'option' => array( |
| 113 | 'selected' => true, |
| 114 | 'value' => array(), |
| 115 | ), |
| 116 | ) |
| 117 | ); |
| 118 | ?> |
| 119 | </select> |
| 120 | </div> |
| 121 | </td> |
| 122 | </tr> |
| 123 | </tbody> |
| 124 | <tfoot> |
| 125 | <tr> |
| 126 | <td> |
| 127 | <div id="cb-consent-api-reset-defaults" class="cb-btn cb-main-btn uc-consent"> |
| 128 | <?php |
| 129 | esc_html_e( |
| 130 | 'Reset to default categories', |
| 131 | 'cookiebot' |
| 132 | ); |
| 133 | ?> |
| 134 | </div> |
| 135 | </td> |
| 136 | </tr> |
| 137 | </tfoot> |
| 138 | </table> |
| 139 | </div> |
| 140 | <?php } ?> |
| 141 |