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')); }
/** * 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')); } }
public function __construct(&$model) { parent::__construct($model); $this->www = false === strpos($this->home, '://www.') ? '://' : '://www.'; }
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')); }