Пример #1
0
 public function __construct(&$polylang)
 {
     parent::__construct($polylang);
     if (!did_action('pll_language_defined')) {
         $this->set_language_from_url();
     }
 }
Пример #2
0
 public function init()
 {
     parent::init();
     if (!did_action('pll_language_defined')) {
         $this->set_language_from_url();
     }
     add_action('request', array(&$this, 'request'));
 }
Пример #3
0
 /**
  * sets the language from content
  *
  * @since 1.2
  */
 public function wp()
 {
     // nothing to do if the language has already been set ( although normally the filter has been removed )
     if (!$this->curlang && ($curlang = $this->get_language_from_content())) {
         parent::set_language($curlang);
     }
 }