private function output_wysiwyg_editors()
 {
     echo '<div style="display: none">';
     foreach ($this->fields as $field) {
         if ($field['field_style'] == 2) {
             $this->editor_object->output_editors($field);
         }
     }
     echo '</div>';
 }
Ejemplo n.º 2
0
    private function render_elements_content()
    {
        ?>
		<div id="dashboard-widgets-wrap">
			<?php 
        $this->all_translations_finished = true;
        $this->render_elements();
        echo $this->editor_object->render_term_metaboxes();
        ?>
		</div>
	<?php 
    }
Ejemplo n.º 3
0
<?php

require_once WPML_TM_PATH . '/menu/wpml-translation-editor-ui.class.php';
/**
 * @var TranslationManagement $iclTranslationManagement
 * @var WPML_Translation_Job_Factory $wpml_translation_job_factory
 */
global $wp_query, $sitepress, $iclTranslationManagement, $current_user, $wpml_translation_job_factory;
if (!isset($job_checked) && (isset($_GET['job_id']) && $_GET['job_id'] > 0 || isset($_GET['trid']) && $_GET['trid'] > 0)) {
    $job_id = WPML_Translation_Editor::get_job_id_from_request();
    $job_object = $wpml_translation_job_factory->get_translation_job($job_id, false, 0, true);
    if (is_a($job_object, 'WPML_Post_Translation_Job')) {
        /** @var WPML_Post_Translation_Job $job_object */
        $job_object->load_terms_from_post_into_job();
    }
    if ($job_object && $job_object->user_can_translate($current_user)) {
        $translation_editor_ui = new WPML_Translation_Editor_UI($sitepress, $iclTranslationManagement, $job_object);
        $translation_editor_ui->render();
        return;
    }
}
if (!empty($_GET['resigned'])) {
    $iclTranslationManagement->add_message(array('type' => 'updated', 'text' => __("You've resigned from this job.", 'wpml-translation-management')));
}
if (isset($_SESSION['translation_ujobs_filter'])) {
    $icl_translation_filter = $_SESSION['translation_ujobs_filter'];
}
$current_translator = $iclTranslationManagement->get_current_translator();
$can_translate = $current_translator && $current_translator->ID > 0 && $current_translator->language_pairs;
$post_link_factory = new WPML_TM_Post_Link_Factory($sitepress);
if ($can_translate) {