Changeset 3315332
- Timestamp:
- 06/20/2025 02:26:31 PM (8 months ago)
- File:
-
- 1 edited
-
avacy/trunk/src/PreemptiveBlock.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
avacy/trunk/src/PreemptiveBlock.php
r3290531 r3315332 15 15 // do a get request 16 16 $blackList = []; 17 $url = 'https://assets.avacy-cdn.com/config/' . get_option('avacy_tenant') . '/' . get_option('avacy_webspace_key') . '/custom-vendor-list.json'; 17 18 $webSpaceKey = get_option('avacy_webspace_key'); 19 $tenant = ''; 20 if(!empty($webSpaceKey)) { 21 if (strpos($webSpaceKey, '|') === false) { 22 $tenant = get_option('avacy_tenant'); 23 } else { 24 $parts = explode('|', $webSpaceKey); 25 $tenant = $parts[0]; 26 $webSpaceKey = $parts[1]; 27 } 28 } 29 30 if(empty($tenant) || empty($webSpaceKey)) { 31 return; 32 } 33 34 $url = 'https://assets.avacy-cdn.com/config/' . $tenant . '/' . $webSpaceKey . '/custom-vendor-list.json'; 18 35 // $url = 'https://avacy-cdn.s3.eu-central-1.amazonaws.com/config/test-production/90990663-c953-493f-9311-97aeef0833dc/custom-vendor-list.json'; 19 36 $customVendorListRequest = wp_remote_get($url); … … 59 76 60 77 if (!empty($buffer)) { 61 // Escape ampersands not part of entities62 $buffer = preg_replace('/&(?![a-zA-Z0-9#]+;)/', '&', $buffer);63 78 64 79 $dom = new DOMDocument();
Note: See TracChangeset
for help on using the changeset viewer.