PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / trunk
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript vtrunk
4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 1.9.3 1.9.4 1.9.5 1.9.6 All 170 releases
← All changes | inc/helper-functions.php +12 -1 4.1.12trunk View file →
@@ -224,8 +224,9 @@
224 224 "/embed",
225 225 "/view-order/",
226 226 "/redirect/",
227 227 "/elementskit-content/",
228 + "/checkout/",
228 229 ];
229 230
230 231 $exclude_items = apply_filters('berqwp_exclude_slug_match', $exclude_items);
231 232
@@ -1920,8 +1921,10 @@
1920 1921 return;
1921 1922 }
1922 1923
1923 1924 $htaccess = get_home_path() . '.htaccess';
1925 + $cache_tag_host = parse_url(home_url(), PHP_URL_HOST);
1926 +
1924 1927 $rules = [
1925 1928 '<IfModule mod_rewrite.c>',
1926 1929 ' RewriteEngine On',
1927 1930 ' RewriteCond %{REQUEST_METHOD} !POST',
@@ -1934,8 +1937,9 @@
1934 1937 '<IfModule mod_mime.c>',
1935 1938 ' <FilesMatch "index\.html\.gz$">',
1936 1939 ' ForceType text/html',
1937 1940 ' AddEncoding gzip .gz',
1941 + ' AddDefaultCharset utf-8',
1938 1942 ' </FilesMatch>',
1939 1943 '</IfModule>',
1940 1944 '<IfModule mod_headers.c>',
1941 1945 ' <FilesMatch "index\.html\.gz$">',
@@ -1944,9 +1948,9 @@
1944 1948 ' Header set Content-Encoding "gzip"',
1945 1949 ' Header set Vary "Accept-Encoding, Cookie"',
1946 1950 ' Header set CDN-Cache-Control "max-age=2592000"',
1947 1951 ' Header set Cache-Control "public, max-age=600, s-maxage=2592000, stale-while-revalidate=86400"',
1948 - ' Header set Cache-Tag "%{HTTP_HOST}e"',
1952 + ' Header set Cache-Tag "' . $cache_tag_host . '"',
1949 1953 ' Header set X-Content-Type-Options "nosniff"',
1950 1954 ' </FilesMatch>',
1951 1955 '</IfModule>',
1952 1956 '<IfModule mod_expires.c>',
@@ -2346,4 +2350,11 @@
2346 2350 $license_key = berqwp_get_license_key();
2347 2351
2348 2352 return !empty($configs['site_id']) && !empty($configs['secret']) && !empty($configs['optimization_method']) && $configs['optimization_method'] == 'cloud' && !empty($license_key);
2349 2353 }
2354 +
2355 +function berqwp_generate_site_id() {
2356 + $blog_id = get_current_blog_id();
2357 + $network_id = function_exists('get_current_network_id') ? get_current_network_id() : 1;
2358 + $siteurl = get_option('siteurl');
2359 + return md5("berqwp|$network_id|$blog_id|$siteurl");
2360 +}