public function __construct(&$polylang) { parent::__construct($polylang); $this->curlang =& $polylang->curlang; $this->init_page_on_front_cache(); $this->cache = new PLL_Cache(); add_action('pll_language_defined', array(&$this, 'pll_language_defined')); add_action('pll_language_defined', array(&$this, 'init_page_on_front_cache')); // translate page on front and page for posts }
public function __construct(&$polylang) { parent::__construct($polylang); $this->using_permalinks = (bool) get_option('permalink_structure'); // are we using permalinks? $this->home = get_option('home'); if ('page' == get_option('show_on_front')) { $this->page_on_front = get_option('page_on_front'); $this->page_for_posts = get_option('page_for_posts'); } add_action('pll_language_defined', array(&$this, 'pll_language_defined'), 10, 2); }
public function __construct(&$links_model) { parent::__construct($links_model); $this->using_permalinks = (bool) get_option('permalink_structure'); // are we using permalinks? $this->home = get_option('home'); $this->page_on_front = get_option('page_on_front'); $this->page_for_posts = get_option('page_for_posts'); add_action('pll_language_defined', array(&$this, 'pll_language_defined'), 10, 2); // adds the domain of the current language to allowed hosts for safe redirection // only when using domains or subdomains if ($this->options['force_lang'] > 1) { add_filter('allowed_redirect_hosts', array(&$this, 'allowed_redirect_hosts')); } }
public function __construct(&$polylang) { parent::__construct($polylang); $this->curlang =& $polylang->curlang; $this->cache = new PLL_Cache(); }