/**
  * @param WPML_Term_Translation $term_translation
  * @param SitePress             $sitepress
  * @param WPML_Post_Translation $post_translation
  */
 public function __construct(&$term_translation, &$sitepress, &$post_translation)
 {
     parent::__construct($post_translation, $sitepress);
     $this->term_translation = $term_translation;
     $this->sitepress = $sitepress;
     $this->post_translation = $post_translation;
     $this->query_utils = $sitepress->get_query_utils();
     $this->wp_api = $sitepress->get_wp_api();
 }
 /**
  * @param WPML_Post_Translation $post_translation
  * @param WPML_URL_Converter    $url_converter
  * @param WPML_Canonicals       $canonicals
  * @param SitePress             $sitepress
  */
 public function __construct(&$post_translation, &$url_converter, WPML_Canonicals $canonicals, &$sitepress)
 {
     parent::__construct($post_translation, $sitepress);
     $this->url_converter =& $url_converter;
     $this->canonicals = $canonicals;
     if ($this->frontend_uses_root() === true) {
         WPML_Root_Page::init();
     }
     $this->add_hooks();
 }
 /**
  * @param Array                 $settings
  * @param WPML_Post_Translation $post_translations
  * @param SitePress             $sitepress
  */
 public function __construct(&$settings, &$post_translations, &$sitepress)
 {
     parent::__construct($post_translations, $sitepress);
     $this->sync_delete = isset($settings['sync_delete']) ? $settings['sync_delete'] : false;
     $this->sync_parent = isset($settings['sync_page_parent']) ? $settings['sync_page_parent'] : false;
     $this->sync_ping_status = isset($settings['sync_ping_status']) ? $settings['sync_ping_status'] : false;
     $this->sync_post_date = isset($settings['sync_post_date']) ? $settings['sync_post_date'] : false;
     $this->sync_post_format = isset($settings['sync_post_format']) ? $settings['sync_post_format'] : false;
     $this->sync_sticky_flag = isset($settings['sync_sticky_flag']) ? $settings['sync_sticky_flag'] : false;
     $this->sync_comment_status = isset($settings['sync_comment_status']) ? $settings['sync_comment_status'] : false;
     $this->sync_page_template = isset($settings['sync_page_template']) ? $settings['sync_page_template'] : false;
     $this->sync_private_flag = isset($settings['sync_private_flag']) ? $settings['sync_private_flag'] : false;
     $this->language_order = isset($settings['languages_order']) && $settings['languages_order'] ? $settings['languages_order'] : wpml_get_setting_filter(false, 'active_languages');
     $this->sync_menu_order = isset($settings['sync_page_ordering']) ? $settings['sync_page_ordering'] : array();
 }
 /**
  * @param WPML_Post_Translation $post_translation
  * @param WPML_URL_Converter    $url_converter
  * @param SitePress             $sitepress
  */
 public function __construct(&$post_translation, &$url_converter, &$sitepress)
 {
     parent::__construct($post_translation, $sitepress);
     $this->url_converter =& $url_converter;
     if ($this->frontend_uses_root() === true) {
         WPML_Root_Page::init();
         add_filter('page_link', array($this, 'permalink_filter_root'), 1, 2);
     } else {
         add_filter('page_link', array($this, 'permalink_filter'), 1, 2);
     }
     add_filter('home_url', array($this, 'home_url_filter'), -10, 4);
     // posts and pages links filters
     add_filter('post_link', array($this, 'permalink_filter'), 1, 2);
     add_filter('post_type_link', array($this, 'permalink_filter'), 1, 2);
     add_filter('get_edit_post_link', array($this, 'get_edit_post_link'), 1, 3);
 }
 /**
  * @param array                 $settings
  * @param WPML_Post_Translation $post_translations
  * @param SitePress             $sitepress
  */
 public function __construct(&$settings, &$post_translations, &$sitepress)
 {
     parent::__construct($post_translations, $sitepress);
     $this->sync_delete = isset($settings['sync_delete']) ? $settings['sync_delete'] : false;
     $this->sync_parent = isset($settings['sync_page_parent']) ? $settings['sync_page_parent'] : false;
     $this->sync_ping_status = isset($settings['sync_ping_status']) ? $settings['sync_ping_status'] : false;
     $this->sync_post_date = isset($settings['sync_post_date']) ? $settings['sync_post_date'] : false;
     $this->sync_post_format = isset($settings['sync_post_format']) ? $settings['sync_post_format'] : false;
     $this->sync_sticky_flag = isset($settings['sync_sticky_flag']) ? $settings['sync_sticky_flag'] : false;
     $this->sync_comment_status = isset($settings['sync_comment_status']) ? $settings['sync_comment_status'] : false;
     $this->sync_page_template = isset($settings['sync_page_template']) ? $settings['sync_page_template'] : false;
     $this->sync_password = isset($settings['sync_password']) ? $settings['sync_password'] : false;
     $this->sync_private_flag = isset($settings['sync_private_flag']) ? $settings['sync_private_flag'] : false;
     $this->sync_document_status = isset($settings['translated_document_status']) ? $settings['translated_document_status'] : 1;
     $this->sync_menu_order = isset($settings['sync_page_ordering']) ? $settings['sync_page_ordering'] : array();
 }
 /**
  * @param WPML_Post_Translation $post_translation
  * @param WPML_URL_Converter    $url_converter
  * @param SitePress             $sitepress
  */
 public function __construct(&$post_translation, &$url_converter, &$sitepress)
 {
     parent::__construct($post_translation, $sitepress);
     $this->url_converter = $url_converter;
     if ($this->frontend_uses_root() === true) {
         require_once ICL_PLUGIN_PATH . '/inc/url-handling/wpml-root-page.class.php';
         add_filter('page_link', array($this, 'permalink_filter_root'), 1, 2);
     } else {
         add_filter('page_link', array($this, 'permalink_filter'), 1, 2);
     }
     add_filter('home_url', array($this, 'home_url_filter'), -10, 1);
     // posts and pages links filters
     add_filter('post_link', array($this, 'permalink_filter'), 1, 2);
     add_filter('post_type_link', array($this, 'permalink_filter'), 1, 2);
     add_filter('get_edit_post_link', array($this, 'get_edit_post_link'), 1, 3);
 }
 /**
  * @param SitePress             $sitepress
  * @param WPML_Post_Translation $post_translation
  */
 function __construct(&$sitepress, &$post_translation)
 {
     parent::__construct($post_translation, $sitepress);
     add_action('wpml_post_edit_languages', array($this, 'render_languages'), 10, 1);
 }