Quantcast
Channel: polylang – WordPress.org Forums
Viewing all articles
Browse latest Browse all 11471

Ov3rfly on "[Plugin: Polylang] Enhance feature "When front page is visited, set language according to browser""

$
0
0

Another small suggestion which fixes one unavailable functionality if no front end cookie is used.

If feature "When the front page is visited, set the language according to the browser preference" is enabled, and user clicks a "Home" link to front page in a a non-browser preference language, and has no cookie set, he gets to the browser preference language front page.

That's ok, a known limiation of the "no cookie" expert setting.

With a small enhancement, this could be taken care of:

File include/core.php, line 144

Now:

if ($this->options['browser']) {

Suggestion: Also checks for "no referer?" or "referer, but not site-internal link"

if ($this->options['browser'] && (!isset($_SERVER['HTTP_REFERER']) || strpos($_SERVER['HTTP_REFERER'], home_url()) === false) ) {

What about that?

http://wordpress.org/extend/plugins/polylang/


Viewing all articles
Browse latest Browse all 11471

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>