field_type, 'field-')){
$element_field_type = apply_filters('icl_editor_cf_name', $element->field_type);
$element_field_style = apply_filters('icl_editor_cf_style', '', $element->field_type);
}else{
$element_field_type = $element->field_type;
$element_field_style = false;
}
?>
field_type, 'field-')){
$icl_editor_cf_description = apply_filters('icl_editor_cf_description', '', $element->field_type);
if($icl_editor_cf_description !== null){
echo '
' . $icl_editor_cf_description . '
';
}
}
?>
field_data, $element->field_format);
$icl_tm_translated_content = TranslationManagement::decode_field_data($element->field_data_translated, $element->field_format);
if($element->field_type=='tags' || $element->field_type=='categories'){
$taxonomy = $element->field_type == 'tags' ? 'post_tag' : 'category';
$icl_tm_translated_taxs[$element->field_type] =
TranslationManagement::determine_translated_taxonomies($icl_tm_original_content, $taxonomy, $job->language_code);
}
$translatable_taxonomies = $sitepress->get_translatable_taxonomies(false, $job->original_post_type);
if(in_array($element->field_type, $translatable_taxonomies)){
$taxonomy = $element->field_type;
$icl_tm_translated_taxs[$element->field_type] =
TranslationManagement::determine_translated_taxonomies($icl_tm_original_content, $taxonomy, $job->language_code);
};
?>
to_language; ?>
| from_language)?>
field_type=='body'): ?>
=')){
$settings = array(
'media_buttons' => false,
'textarea_name' => 'fields['.$element->field_type.'][data]',
'textarea_rows' => 20
);
wp_editor($icl_tm_translated_content, 'fields['.$element->field_type.'][data]', $settings);
}else{
the_editor($icl_tm_translated_content, 'fields['.$element->field_type.'][data]', false, false);
}
?>
field_format == 'csv_base64'): ?>
$c): ?>
field_type][$k])){
$icl_tm_translated_content[$k] = $icl_tm_translated_taxs[$element->field_type][$k];
$icl_tm_f_translated = true;
}else{
$icl_tm_f_translated = false;
}
?>
field_type, 'field-') && $element_field_style == 1): ?>
field_type, 'field-') && $element_field_style == 2):
if(version_compare($wp_version, '3.3', '>=')){
$settings = array(
'media_buttons' => false,
'textarea_name' => 'fields['.$element->field_type.'][data]',
'textarea_rows' => 4
);
wp_editor($icl_tm_translated_content, 'fields['.$element->field_type.'][data]', $settings);
}else{
?>
from_language; ?>
field_type=='tags' || $element->field_type=='categories' || in_array($element->field_type, $translatable_taxonomies)){
if($element->field_type=='tags'){
$term_taxonomy = 'post_tag';
}elseif($element->field_type=='categories'){
$term_taxonomy = 'category';
}else{
$term_taxonomy = $element->field_type;
}
if(!empty($icl_tm_original_content)){
$res = $wpdb->get_results($wpdb->prepare(
"SELECT t.name, x.description FROM {$wpdb->terms} t
JOIN {$wpdb->term_taxonomy} x ON x.term_id = t.term_id
WHERE description<>'' && x.taxonomy=%s
AND t.name IN ('".join("','", $wpdb->escape($icl_tm_original_content))."')",
$term_taxonomy
));
$term_descriptions = array();
foreach($res as $row){
$term_descriptions[$row->name] = $row->description;
}
}
}
if($element->field_type=='body' || $element_field_style == 2){
$icl_tm_original_content_html = esc_html($icl_tm_original_content);
$icl_tm_original_content = apply_filters('the_content', $icl_tm_original_content);
$icl_wysiwyg_height = $element->field_type == 'body' ? get_option('default_post_edit_rows', 20)*20 : 100;
?>
field_type=='body' || $element_field_style == 2): ?>
>
field_format == 'csv_base64'): ?>
>
field_finished && !empty($job->prev_version)): ?>
prev_version->elements as $pel){
if($element->field_type == $pel->field_type){
$prev_value = TranslationManagement::decode_field_data($pel->field_data, $pel->field_format);
}
}
$diff = wp_text_diff( $prev_value, TranslationManagement::decode_field_data($element->field_data, $element->field_format) );
if(!empty($diff)){
?>