$def_value) {
$title = $table_cols[$field]['jlang'];
$type = $table_cols[$field]['type'];
if ($type == 'skip') {
continue;
}
$tn_value = '';
$tn_class = ' vbo-missing-translation';
if (!isset($lang_record_tn[$reference_id])) {
$lang_record_tn[$reference_id] = [];
}
if (array_key_exists($reference_id, ($lang_record_tn ?? [])) && array_key_exists($field, ($lang_record_tn[$reference_id]['content'] ?? [])) && strlen($lang_record_tn[$reference_id]['content'][$field])) {
if (in_array($type, array('text', 'textarea', 'html'))) {
$tn_class = ' vbo-field-translated';
} else {
$tn_class = '';
}
}
?>
= 7 supporting throwable exceptions for Fatal Errors
* we try to avoid issues with third party plugins that make use
* of the WP native function get_current_screen().
*
* @wponly
*/
try {
echo $editor->display( "tn[".$ltag."][".$reference_id."][".$field."]", $tn_value, '100%', 350, 70, 20, true, "tn_".$ltag."_".$reference_id."_".$field );
} catch (Throwable $t) {
echo $t->getMessage() . ' in ' . $t->getFile() . ':' . $t->getLine() . '
';
}
} else {
// we cannot catch Fatal Errors in PHP 5.x
echo $editor->display( "tn[".$ltag."][".$reference_id."][".$field."]", $tn_value, '100%', 350, 70, 20, true, "tn_".$ltag."_".$reference_id."_".$field );
}
}
?>
$jval) {
if ((!in_array($jkey, $keys) && count($keys) > 0) || empty($jval)) {
continue;
}
$json_lbl = ' ';
if (!is_numeric($jkey)) {
$guess_lbl = JText::translate('VBO_' . strtoupper($jkey));
$json_lbl = $guess_lbl != 'VBO_' . strtoupper($jkey) ? $guess_lbl : ucwords($jkey);
}
?>
40) {
// check if this translation field requires the rich text visual editor
if ($jkey == 'tpl_text' && strpos($jval, '<') !== false) {
// the original field contains HTML code built through the visual editor
$veditor_name = 'tn[' . $ltag . '][' . $reference_id . '][' . $field . '][' . $jkey . ']';
$veditor_id = 'tn_' . $ltag . '_' . $reference_id . '_' . $field . '_' . $jkey;
$tarea_attr = array(
'id' => $veditor_id,
'rows' => '7',
'cols' => '170',
'style' => 'min-width: 60%;',
);
$editor_opts = array(
'modes' => array(
'visual',
'text',
),
);
echo $vbo_app->renderVisualEditor($veditor_name, (isset($tn_json_value[$jkey]) ? $tn_json_value[$jkey] : ''), $tarea_attr, $editor_opts);
} else {
?>