public function __construct(&$wpdb, &$sitepress) { parent::__construct($wpdb, $sitepress); $this->settings = new WPML_post_slug_translation_settings($sitepress); $this->post_sync_setting = new WPML_custom_post_sync_settings($sitepress); wp_enqueue_script('wpml-custom-post-ui', WPML_ST_URL . '/res/js/wpml_custom_post_ui.js', array('jquery'), WPML_ST_VERSION, true); }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param TranslationManagement $tm_instance */ public function __construct(&$wpdb, &$sitepress, &$tm_instance) { parent::__construct($wpdb, $sitepress); $this->tm_instance =& $tm_instance; $this->active_service = TranslationProxy::get_current_service(); $this->service_name = TranslationProxy::get_current_service_name(); }
/** * @param SitePress $sitepress * @param wpdb $wpdb * @param WPML_Translation_Job_Factory $job_factory * @param WPML_TM_Blog_Translators $blog_translators * @param array $notification_settings */ public function __construct(&$sitepress, &$wpdb, &$job_factory, $blog_translators, array $notification_settings) { parent::__construct($wpdb, $sitepress); $this->job_factory =& $job_factory; $this->blog_translators = $blog_translators; $this->notification_settings = array_merge(array('resigned' => 0, 'completed' => 0), $notification_settings); }
/** * @param SitePress $sitepress * @param wpdb $wpdb * @param WPML_Element_Translation_Job $job */ public function __construct(&$sitepress, &$wpdb, $job) { parent::__construct($wpdb, $sitepress); $this->job = $job; add_filter('tiny_mce_before_init', array($this, 'filter_original_editor_buttons'), 10, 2); $this->enqueue_js(); }
/** * WPML_Integration constructor. * * @param wpdb $wpdb * @param SitePress $sitepress */ public function __construct(wpdb &$wpdb, SitePress &$sitepress) { parent::__construct($wpdb, $sitepress); if (class_exists('acf')) { new WPML_TM_ACF($wpdb, $sitepress); } }
/** * WPML_Custom_Columns constructor. * * @param WPDB $wpdb * @param SitePress $sitepress */ public function __construct(&$wpdb, &$sitepress) { parent::__construct($wpdb, $sitepress); // column with links to translations (or add translation) - low priority add_action('admin_init', array($this, 'add_custom_columns_hooks'), 1010); // accommodate Types init@999 }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param string $taxonomy */ public function __construct(&$wpdb, &$sitepress, $taxonomy) { parent::__construct($wpdb, $sitepress); $this->taxonomy = $taxonomy; add_action('init', array($this, 'init')); add_action('after-category-table', array($this, 'category_display_action'), 1, 0); add_filter('wp_redirect', array($this, 'preserve_lang_param')); }
public function __construct(&$wpdb, &$sitepress) { parent::__construct($wpdb, $sitepress); $active_languages = $this->sitepress->get_active_languages(); foreach ($active_languages as $lang) { $this->active_languages[] = $lang['code']; } }
/** * @param SitePress $sitepress * @param WPML_Terms_Translations $term_utils * @param string $taxonomy */ public function __construct(&$sitepress, &$term_utils, $taxonomy) { $wpdb = $sitepress->wpdb(); parent::__construct($wpdb, $sitepress); $this->term_utils = $term_utils; $this->taxonomy = $taxonomy; $this->data = $this->set_affected_ids(); $this->prepare_missing_terms_data(); }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param string $language * @param null|object $existing_filter * @param null|WPML_ST_Db_Cache_Factory */ public function __construct(&$wpdb, &$sitepress, $language, $existing_filter = null, $db_cache_factory = null) { parent::__construct($wpdb, $sitepress); $this->language = $language; if ($db_cache_factory instanceof WPML_ST_DB_Cache_Factory) { $this->db_cache_factory = $db_cache_factory; } else { $this->db_cache_factory = new WPML_ST_DB_Cache_Factory($wpdb); } $this->db_cache = $this->db_cache_factory->create($language); }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param string $element_type * @param bool $root * @param bool | array $terms */ public function __construct(&$wpdb, &$sitepress, $element_type, $root = false, $terms = false) { parent::__construct($wpdb, $sitepress); $this->taxonomy = $element_type; $this->root_trid = $root; $this->tree = false; if (!$terms) { $terms = $this->get_terms_by_taxonomy($element_type); } $this->language_order = $this->get_language_order($terms); $this->tree = $this->get_tree_from_terms_array($terms); }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param array $args */ public function __construct(&$wpdb, &$sitepress, $args) { parent::__construct($wpdb, $sitepress); /** * Actual name of the term. Same as the name input argument to \wp_update_term or \wp_insert_term * @var string|bool */ $term = false; $slug = ''; $taxonomy = ''; /** @var string $lang_code */ $lang_code = ''; $trid = null; /** @var int|bool $original_tax_id */ $original_tax_id = false; /** * Taxonomy_term_id of the parent element * @var int */ $parent = 0; $description = false; $term_group = false; $source_language = null; extract($args, EXTR_OVERWRITE); // We cannot create a term unless we at least know its name if ((string) $term !== "" && $taxonomy) { $this->wp_new_term_args['name'] = $term; $this->taxonomy = $taxonomy; } else { $this->is_valid = false; return; } if ($parent) { $this->wp_new_term_args['parent'] = $parent; } if ($description) { $this->wp_new_term_args['description'] = $description; } if ($term_group) { $this->wp_new_term_args['term_group'] = $term_group; } $this->wp_new_term_args['term_group'] = $term_group; $this->is_valid = $this->set_language_information($trid, $original_tax_id, $lang_code, $source_language); $this->set_action_type(); if (!$this->is_update || $this->is_update && $slug != $this->old_slug && !empty($slug)) { if (trim($slug) == '') { $slug = sanitize_title($term); } $slug = WPML_Terms_Translations::term_unique_slug($slug, $taxonomy, $lang_code); $this->wp_new_term_args['slug'] = $slug; } }
/** * @param WPDB $wpdb * @param SitePress $sitepress * @param TranslationManagement $iclTranslationManagement * @param WPML_Element_Translation_Job $job_instance * @param WPML_TM_Job_Action_Factory $job_factory * @param WPML_TM_Job_Layout $job_layout */ function __construct(&$wpdb, &$sitepress, &$iclTranslationManagement, $job_instance, $job_factory, $job_layout) { parent::__construct($wpdb, $sitepress); $this->tm_instance = $iclTranslationManagement; $this->job_instance = $job_instance; $this->job = $job_instance->get_basic_data(); $this->job_factory = $job_factory; $this->job_layout = $job_layout; if ($job_instance->get_translator_id() <= 0) { $job_instance->assign_to($sitepress->get_wp_api()->get_current_user_id(), 'local'); } $job_instance->maybe_load_terms_from_post_into_job($sitepress->get_setting('tm_block_retranslating_terms')); }
/** * @param SitePress $sitepress * @param wpdb $wpdb * @param string $target_lang the display name of the target language * @param string $source_lang the display name of the source language * @param string $rtl_original * @param string $rtl_translated */ public function __construct(&$sitepress, &$wpdb, $target_lang, $source_lang, $rtl_original, $rtl_translated) { parent::__construct($wpdb, $sitepress); $this->target_lang = $target_lang; $this->lang_source = $source_lang; $this->click_to_toggle_html = '<div title="' . __('Click to toggle', 'wpml-translation-management') . '" class="handlediv"><br /></div>'; $this->original_content_paragraph_html = $this->render_original_content_paragraph(); $this->rtlo = $rtl_original; $this->rtlt = $rtl_translated; add_filter('tiny_mce_before_init', array($this, 'filter_original_editor_buttons'), 10, 2); add_filter('the_editor', array($this, 'filter_original_editor_textarea'), 10, 1); $this->enqueue_js(); add_action('after_wp_tiny_mce', array($this, 'init_tinymce')); }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param string $language */ public function __construct(&$wpdb, &$sitepress, $language, $existing_filter = null) { parent::__construct($wpdb, $sitepress); $this->language = $language; if ($existing_filter) { $this->original_cache = $existing_filter->original_cache; $this->name_cache = $existing_filter->name_cache; $this->untranslated_cache = $existing_filter->untranslated_cache; $this->use_original_cache = $existing_filter->use_original_cache; $this->cache_is_warm = $existing_filter->cache_is_warm; } else { $this->use_original_cache = $this->use_original_cache(); } }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param string $language * @param null|object $existing_filter */ public function __construct(&$wpdb, &$sitepress, $language, $existing_filter = null) { parent::__construct($wpdb, $sitepress); $this->language = $language; if ($existing_filter) { $this->name_cache = $existing_filter->name_cache; $this->untranslated_cache = $existing_filter->untranslated_cache; $this->cache_is_warm = $existing_filter->cache_is_warm; $this->object_cache = $existing_filter->object_cache; $this->found_cache = $existing_filter->found_cache; $this->cache_needs_saving = $existing_filter->cache_needs_saving; } else { $this->object_cache = new WPML_WP_Cache('wpml_display_filter'); } }
/** * WPML_ACF constructor. * * @param wpdb $wpdb * @param SitePress $sitepress */ public function __construct(wpdb $wpdb, SitePress $sitepress) { parent::__construct($wpdb, $sitepress); $this->init_hooks(); }
/** * @param wpdb $wpdb * @param SitePress $sitepress * @param WPML_Post_Translation $post_translations */ public function __construct(&$wpdb, &$sitepress, &$post_translations) { parent::__construct($wpdb, $sitepress); $this->post_translations =& $post_translations; }
/** * WPML_Locale constructor. * * @param wpdb $wpdb * @param SitePress $sitepress * @param string $locale */ public function __construct(&$wpdb, &$sitepress, &$locale) { parent::__construct($wpdb, $sitepress); $this->locale =& $locale; $this->locale_cache = null; }
public function __construct(&$wpdb, &$sitepress) { parent::__construct($wpdb, $sitepress); $this->string_settings = $this->sitepress->get_setting('st', array()); }
public function __construct(&$wpdb, &$sitepress, $switched, $lang) { parent::__construct($wpdb, $sitepress); $this->switched = $switched; $this->lang = $lang; }
public function __construct(&$wpdb, &$sitepress, &$string_factory) { parent::__construct($wpdb, $sitepress); $this->string_factory =& $string_factory; $this->language_of_domain = new WPML_Language_Of_Domain($sitepress); }
/** * WPML_Fix_Type_Assignments constructor. * * @param SitePress $sitepress */ public function __construct($sitepress) { $wpdb = $sitepress->wpdb(); parent::__construct($wpdb, $sitepress); }
public function __construct(&$wpdb, &$sitepress) { parent::__construct($wpdb, $sitepress); }
/** * WPML_Taxonomy_Translation_Screen_Data constructor. * * @param SitePress $sitepress * @param string $taxonomy */ public function __construct(&$sitepress, $taxonomy) { $wpdb = $sitepress->wpdb(); parent::__construct($wpdb, $sitepress); $this->taxonomy = $taxonomy; }
public function __construct(&$wpdb, &$sitepress, &$st_instance, $option_name) { parent::__construct($wpdb, $sitepress); $this->st_instance =& $st_instance; $this->option_name = $option_name; }