PluginProbe
Polylang / 2.8
Polylang v2.8
3.8.9 3.8.8 3.8.7 3.8.6 3.8.5 3.8.4 3.8.3 2.7 2.7.0.1 2.7.1 2.7.2 2.7.3 2.7.4 2.8 2.8.1 2.8.2 2.8.3 2.8.4 2.9 2.9.1 2.9.2 3.0 3.0.1 3.0.2 3.0.3 All 233 releases
← All changes | integrations/cache/cache-compat.php +3 -6 2.92.8 View file →
@@ -33,16 +33,14 @@
33 33 *
34 34 * @since 2.3
35 35 */
36 36 public function add_cookie_script() {
37 - $domain = ( 2 === PLL()->options['force_lang'] ) ? wp_parse_url( PLL()->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN;
38 - $samesite = ( 3 === $this->options['force_lang'] ) ? 'None' : 'Lax';
39 -
37 + $domain = ( 2 == PLL()->options['force_lang'] ) ? wp_parse_url( PLL()->links_model->home, PHP_URL_HOST ) : COOKIE_DOMAIN;
40 38 $js = sprintf(
41 39 '(function() {
42 40 var expirationDate = new Date();
43 41 expirationDate.setTime( expirationDate.getTime() + %d * 1000 );
44 - document.cookie = "%s=%s; expires=" + expirationDate.toUTCString() + "; path=%s%s%s%s";
42 + document.cookie = "%s=%s; expires=" + expirationDate.toUTCString() + "; path=%s%s%s";
45 43 }());',
46 44 esc_js( apply_filters( 'pll_cookie_expiration', YEAR_IN_SECONDS ) ),
47 45 esc_js( PLL_COOKIE ),
48 46 esc_js( pll_current_language() ),
@@ -47,10 +45,9 @@
47 45 esc_js( PLL_COOKIE ),
48 46 esc_js( pll_current_language() ),
49 47 esc_js( COOKIEPATH ),
50 48 $domain ? '; domain=' . esc_js( $domain ) : '',
51 - is_ssl() ? '; secure' : '',
52 - '; SameSite=' . $samesite
49 + is_ssl() ? '; secure' : ''
53 50 );
54 51 echo '<script type="text/javascript">' . $js . '</script>'; // phpcs:ignore WordPress.Security.EscapeOutput
55 52 }
56 53