wp_editor default content
-
Hello I have wordpress site with Catablog Plugin and WPML translation plugin installed.
Page uses Catablog to display products image and instead of regular description small html table. You can see it here: https://th3rion.unixstorm.org/jarex/?page_id=162
Most of the table doesnt change – i didnt manage to make it default wp_editor content but added shortcode button to TinyMCE with table with one column empty. Everythings was ok but i recently installed WPML and realised that theres no way to automatically translate left column of the table so i will have to add each product manually for each language.
WPML supports string translation but text must be transformed to GetText text. For example:
<?php _(‘Hello world’,’cool_theme’); ?>
I dont know how to do it.
<?php wp_editor($result->getDescription(), 'description', array('media_buttons'=>true, 'teeny'=>false, 'tinymce' => true));?>
This is the code which i think is responsible for wp_editor in Catablog. By the moment i found that when i change code to this:
<?php $content='sampletext'; wp_editor($content, $result->getDescription(), 'description', array('media_buttons'=>true, 'teeny'=>false, 'tinymce' => true));?>
it ads ‘sampletext’ as default to wp_editor but disables the visual editor leaving only html editor enabled. Text is still not translatable. And obviously i cant add php in content…
- The topic ‘wp_editor default content’ is closed to new replies.