Example #1
0
 public function __construct(&$model)
 {
     parent::__construct($model);
     // inspired by wp-includes/rewrite.php
     $this->root = preg_match('#^/*' . $this->index . '#', get_option('permalink_structure')) ? $this->index . '/' : '';
     add_action('pll_init', array(&$this, 'init'));
 }
 /**
  * Constructor
  *
  * @since 2.0
  *
  * @param object $model PLL_Model instance
  */
 public function __construct(&$model)
 {
     parent::__construct($model);
     // Avoid cross domain requests ( mainly for custom fonts )
     add_filter('content_url', array($this, 'site_url'));
     add_filter('plugins_url', array($this, 'site_url'));
     add_filter('upload_dir', array($this, 'upload_dir'));
 }
Example #3
0
 /**
  * Constructor
  *
  * @since 1.2
  *
  * @param object $model PLL_Model instance
  */
 public function __construct(&$model)
 {
     parent::__construct($model);
     if (did_action('pll_init')) {
         $this->init();
     } else {
         add_action('pll_init', array(&$this, 'init'));
     }
 }
Example #4
0
 public function __construct(&$model)
 {
     parent::__construct($model);
     $this->www = false === strpos($this->home, '://www.') ? '://' : '://www.';
 }
Example #5
0
 public function __construct(&$model)
 {
     parent::__construct($model);
     add_filter('site_url', array(&$this, 'site_url'));
 }
 public function __construct(&$model)
 {
     parent::__construct($model);
     add_action('pll_init', array(&$this, 'init'));
 }