pll_language cookie
-
Hi, plugin works with all the site cookies, but the pll_language. This cookie is activated also if user do not choose to activate any cookie.
I do not want to exclude this cookie at all, I would like just to give a choice to user. How can I block it together with other cookies?
The Polylang plugin developer give this unswer:
Let say that it’s the case and that this cookie is named cookies_accepted. Something like:
add_action( 'plugins_loaded', function() { if ( empty( $_COOKIE['cookies_accepted'] ) ) { define( 'PLL_COOKIE', false ); } }, 0 );should do the trick.
The code must be put in a plugin. It would not work in a theme.Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘pll_language cookie’ is closed to new replies.