PluginProbe
Polylang / 2.0.3
Polylang v2.0.3
3.8.10 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 All 234 releases
polylang / frontend / choose-lang-domain.php

choose-lang-domain.php in Polylang 2.0.3, at frontend/choose-lang-domain.php

37 lines 782 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Choose the language when the language is managed by different domains
5 *
6 * @since 1.5
7 */
8 class PLL_Choose_Lang_Domain extends PLL_Choose_Lang_Url {
9
10 /**
11 * don't set any language cookie
12 *
13 * @since 1.5
14 */
15 protected function maybe_setcookie() {}
16
17 /**
18 * don't redirect according to browser preferences
19 *
20 * @since 1.5
21 */
22 public function get_preferred_language() {
23 return $this->model->get_language( $this->links_model->get_language_from_url() );
24 }
25
26 /**
27 * Adds query vars to query for home pages in all languages
28 *
29 * @since 1.5
30 */
31 public function home_requested() {
32 $this->set_lang_query_var( $GLOBALS['wp_query'], $this->curlang );
33 /** This action is documented in include/choose-lang.php */
34 do_action( 'pll_home_requested' );
35 }
36 }
37