Changeset 3369608
- Timestamp:
- 09/29/2025 10:23:29 AM (5 months ago)
- Location:
- avacy/trunk/src
- Files:
-
- 2 edited
-
AddAdminInterface.php (modified) (2 diffs)
-
views/avacy-dashboard.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
avacy/trunk/src/AddAdminInterface.php
r3305818 r3369608 145 145 $avacyActiveTab = $_POST['avacy_active_tab'] ?? 'cookie-banner'; 146 146 if (!empty($can_update) && isset($avacyActiveTab) && empty($checkSaasAccount)) { 147 update_option('avacy_webspace_key', esc_attr($saveAccountToken));148 147 update_option('avacy_show_banner', esc_attr($showBanner)); 149 148 update_option('avacy_enable_preemptive_block', esc_attr($enablePreemptiveBlock)); … … 155 154 'success' 156 155 ]; 156 } 157 158 // if current avacy_webspace_key and avacy_tenant are not the same as the new ones, update them 159 if (get_option('avacy_tenant') !== $tenant || get_option('avacy_webspace_key') !== $webspaceKey) { 160 update_option('avacy_tenant', esc_attr($tenant)); 161 update_option('avacy_webspace_key', esc_attr($saveAccountToken)); 157 162 } 158 163 -
avacy/trunk/src/views/avacy-dashboard.php
r3328185 r3369608 116 116 <div class="AvacyDescription"> 117 117 <p> 118 <?php 119 $cookie_banner_href = $base_api_url.'/redirect/cookie-banner/'.get_option('avacy_tenant').'/'.get_option('avacy_webspace_key'); 118 <?php 119 $isKeyInOldFormat = strpos(get_option('avacy_webspace_key'), '|') === false; 120 if( $isKeyInOldFormat) { 121 $webspaceKey = get_option('avacy_webspace_key'); 122 } else { 123 $accountToken = explode('|', get_option('avacy_webspace_key')); 124 $webspaceKey = $accountToken[1]; 125 } 126 $cookie_banner_href = $base_api_url.'/redirect/cookie-banner/'.get_option('avacy_tenant').'/'.$webspaceKey; 120 127 echo wp_kses_post(sprintf(__('To modify the appearance of the cookie banner <a href=%s target="_blank">click here</a>.', 'avacy'),esc_url($cookie_banner_href))); 121 128 ?>
Note: See TracChangeset
for help on using the changeset viewer.