/** @param TranslationManagement tm_instance */ public function __construct(&$tm_instance, &$sitepress) { parent::__construct($sitepress); if (!is_admin()) { $this->add_filters_for_translating_link_targets($tm_instance); } }
public function __construct(&$sitepress, &$st_instance, &$pagenow, $get_page) { parent::__construct($sitepress); $this->st_instance =& $st_instance; $this->pagenow =& $pagenow; $this->get_page = $get_page; }
/** * WPML_Frontend_Redirection constructor. * * @param SitePress $sitepress * @param WPML_Frontend_Request $request_handler * @param WPML_Redirection $redir_helper * @param WPML_Language_Resolution $lang_resolution */ public function __construct(&$sitepress, &$request_handler, &$redir_helper, &$lang_resolution) { parent::__construct($sitepress); $this->request_handler =& $request_handler; $this->redirect_helper =& $redir_helper; $this->lang_resolution =& $lang_resolution; }
public function __construct(&$sitepress, $default_language, $source_language, $element_id) { $this->default_language_code = $default_language; $this->source_language_code = $source_language; $this->element_id = $element_id; parent::__construct($sitepress); }
public function __construct(&$sitepress) { parent::__construct($sitepress); $this->language_changes_history[] = $sitepress->get_current_language(); $this->admin_language_changes_history[] = $this->sitepress->get_admin_language(); $this->register_hooks(); }
/** * WPML_ST_Admin_Blog_Option constructor. * * @param SitePress $sitepress * @param WPML_String_Translation $st_instance * @param string $option_name */ public function __construct(&$sitepress, &$st_instance, $option_name) { if (!in_array($option_name, array('Tagline', 'Blog Title'), true)) { throw new InvalidArgumentException($option_name . ' Is not a valid blog option that is handled by this class, allowed values are "Tagline" and "Blog Title"'); } parent::__construct($sitepress); $this->admin_option = $st_instance->get_admin_option($option_name); }
public function __construct(&$sitepress) { parent::__construct($sitepress); $string_settings = $this->sitepress->get_setting('st'); if (isset($string_settings['lang_of_domain'])) { $this->language_of_domain = $string_settings['lang_of_domain']; } }
/** * WPML_Translation_Element constructor. * * @param int $id * @param SitePress $sitepress * @param WPML_WP_Cache $wpml_cache */ public function __construct($id, SitePress $sitepress, WPML_WP_Cache $wpml_cache = null) { if (!is_numeric($id) || $id <= 0) { throw new InvalidArgumentException('Argument ID must be numeric and greater than 0.'); } $this->id = (int) $id; $this->wpml_cache = $wpml_cache ? $wpml_cache : new WPML_WP_Cache(WPML_ELEMENT_TRANSLATIONS_CACHE_GROUP); parent::__construct($sitepress); }
/** * @param SitePress $sitepress */ public function __construct(&$sitepress) { parent::__construct($sitepress); if ($this->sitepress->get_setting('language_negotiation_type') == 2) { add_filter('preview_post_link', array($this, 'preview_post_link_filter'), 10, 1); add_filter('preview_page_link ', array($this, 'preview_post_link_filter'), 10, 1); } add_action('wpml_scripts_setup', array($this, 'scripts_setup'), 10, 1); }
/** * @param SitePress $sitepress * @param string $element_type * @param object[] $terms */ public function __construct(&$sitepress, $element_type, $terms) { if (!$terms) { throw new InvalidArgumentException('No terms to order given given'); } parent::__construct($sitepress); $this->taxonomy = $element_type; $this->language_order = $this->get_language_order($terms); $this->tree = $this->get_tree_from_terms_array($terms); }
/** * WPML_ST_Admin_Option constructor. * * @param SitePress $sitepress * @param WPML_String_Translation $st_instance * @param string $option_name * @param string $language */ public function __construct(&$sitepress, &$st_instance, $option_name, $language = '') { if (!$option_name || !is_scalar($option_name)) { throw new InvalidArgumentException('Not a valid option name, received: ' . serialize($option_name)); } parent::__construct($sitepress); $this->st_instance =& $st_instance; $this->option_name = $option_name; $this->language = $language ? $language : $this->st_instance->get_current_string_language($option_name); }
/** * @param string $index_singular * @param string $index_plural * @param TranslationManagement $tm_instance * @param SitePress $sitepress * @param WPML_Settings_Helper $settings_helper */ function __construct($index_singular, $index_plural, &$tm_instance, &$sitepress, &$settings_helper) { parent::__construct($sitepress); $this->index_singular = $index_singular; $this->index_plural = $index_plural; $this->index_ro = $index_plural . '_readonly_config'; $this->index_sync = $index_plural . '_sync_option'; $this->tm_instance = $tm_instance; $this->settings_helper = $settings_helper; }
/** * @param SitePress $sitepress * @param TranslationManagement $iclTranslationManagement * @param WPML_Element_Translation_Job $job_instance */ function __construct(&$sitepress, &$iclTranslationManagement, $job_instance) { parent::__construct($sitepress); $this->tm_instance = $iclTranslationManagement; $this->current_element_index = 0; $this->job_instance = $job_instance; $this->job = $job_instance->get_basic_data(); if ($job_instance->get_translator_id() <= 0) { $job_instance->assign_to($sitepress->get_wp_api()->get_current_user_id(), 'local'); } }
/** * WPML_Taxonomy_Translation constructor. * * @param string $taxonomy if given renders a specific taxonomy, * otherwise renders a placeholder * @param bool[] $args array with possible indices: * 'taxonomy_selector' => bool .. whether or not to show the taxonomy selector * @param WPML_UI_Screen_Options_Factory $screen_options_factory */ public function __construct(&$sitepress, $taxonomy = '', $args = array(), $screen_options_factory = null) { parent::__construct($sitepress); $this->tax_selector = isset($args['taxonomy_selector']) ? $args['taxonomy_selector'] : true; $this->taxonomy = $taxonomy ? $taxonomy : false; if ($taxonomy) { $this->taxonomy_obj = get_taxonomy($taxonomy); } if ($screen_options_factory) { $this->screen_options = $screen_options_factory->create_pagination('taxonomy_translation_per_page', ICL_TM_DOCS_PER_PAGE); $this->help_tab = $screen_options_factory->create_help_tab('taxonomy_translation_help_tab', __('Taxonomy Translation', 'sitepress'), '<p>' . __('Descriptive content that will show in My Help Tab-body goes here.') . '</p>'); } }
/** * WPML_Translation_Management constructor. * * @param SitePress $sitepress * @param WPML_TM_Loader $tm_loader * @param TranslationManagement $tm_instance * @param WPML_TP_Translator $wpml_tp_translator */ function __construct(&$sitepress, &$tm_loader, &$tm_instance, WPML_TP_Translator &$wpml_tp_translator = null) { parent::__construct($sitepress); global $wpdb; $this->tm_loader =& $tm_loader; $this->tm_instance =& $tm_instance; $this->wpml_tm_menus = new WPML_TM_Menus(); $this->wpml_tp_translator = $wpml_tp_translator; if (null === $this->wpml_tp_translator) { $this->wpml_tp_translator = new WPML_TP_Translator(); } $this->ajax_route = new WPML_Ajax_Route(new WPML_TM_Ajax_Factory($wpdb, $sitepress, $_POST)); }
/** * WPML_TP_Pickup_Box_Ajax constructor. * * @param SitePress $sitepress * @param WPML_TP_Polling_Status_Factory $polling_pickup_factory * @param TranslationProxy_Project $project */ public function __construct(&$sitepress, &$polling_pickup_factory, $project) { parent::__construct($sitepress); $this->polling_pickup_factory =& $polling_pickup_factory; $this->project = $project; }
/** * WPML_TM_Widget_Filter constructor. * * @param SitePress $sitepress * @param WPML_ST_String_Factory $string_factory */ public function __construct(&$sitepress, &$string_factory) { parent::__construct($sitepress); $this->string_factory =& $string_factory; }
public function __construct($sitepress) { parent::__construct($sitepress); }
/** * WPML_TM_Post_Edit_Custom_Field_Settings_Menu constructor. * * @param SitePress $sitepress * @param WPML_Custom_Field_Setting_Factory $settings_factory * @param WP_Post $post */ public function __construct(&$sitepress, &$settings_factory, $post) { parent::__construct($sitepress); $this->setting_factory =& $settings_factory; $this->post = $post; }
public function __construct(SitePress &$sitepress) { parent::__construct($sitepress); $this->rescan_required = $sitepress->get_setting(self::OPTION_NAME, false); }
/** * WPML_User_Options_Menu constructor. * * @param SitePress $sitepress * @param WP_User $current_user */ public function __construct(&$sitepress, &$current_user) { parent::__construct($sitepress); $this->current_user =& $current_user; }
/** * WPML_XMLRPC constructor. * * @param SitePress $sitepress */ public function __construct(SitePress $sitepress) { parent::__construct($sitepress); $this->xmlrpc_call_methods_for_save_post = array('wp.newPost', 'wp.editPost', 'wp.newPage', 'wp.editPage'); }
public function __construct(&$sitepress) { parent::__construct($sitepress); $this->settings = $sitepress->get_setting('posts_slug_translation', array()); }
/** * WPML_TM_Post_Link constructor. * * @param SitePress $sitepress * @param int $post_id */ public function __construct(&$sitepress, $post_id) { parent::__construct($sitepress); $this->post_id = $post_id; }
/** * WPML_Sync_Term_Meta_Action constructor. * * @param SitePress $sitepress * @param int $term_taxonomy_id just saved term's term_taxonomy_id */ public function __construct(&$sitepress, $term_taxonomy_id) { parent::__construct($sitepress); $this->term_taxonomy_id = $term_taxonomy_id; }
/** * @param WPML_Post_Translation $post_translation * @param SitePress $sitepress */ public function __construct(&$post_translation, &$sitepress) { parent::__construct($sitepress); $this->post_translation =& $post_translation; }
/** * WPML_Language_Per_Domain_SSO constructor. * * @param SitePress $sitepress */ public function __construct($sitepress) { parent::__construct($sitepress); $this->site_url = get_option('siteurl'); $this->domains = $this->get_domains(); }
/** * WPML_Translations_Queue constructor. * * @param SitePress $sitepress * @param WPML_UI_Screen_Options_Factory $screen_options_factory */ public function __construct(&$sitepress, $screen_options_factory) { parent::__construct($sitepress); $this->screen_options = $screen_options_factory->create_pagination('tm_translations_queue_per_page', ICL_TM_DOCS_PER_PAGE); }
function __construct(&$sitepress) { parent::__construct($sitepress); self::enqueue_scripts(); }
/** * WPML_BBPress_Filters constructor. * * @param WPML_BBPress_API $wpml_bbpress_api * @param SitePress $sitepress * @param WPML_URL_Converter $wpml_url_converter */ public function __construct($wpml_bbpress_api, $sitepress, $wpml_url_converter) { $this->wpml_bbpress_api =& $wpml_bbpress_api; $this->wpml_url_converter =& $wpml_url_converter; parent::__construct($sitepress); }