target_lang = $target_lang; $this->lang_source = $source_lang; $this->click_to_toggle_html = '

'; $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' ) ); } public function filter_original_editor_buttons( $config, $editor_id ) { if ( strpos( $editor_id, 'original_' ) === 0 ) { $config[ 'toolbar1' ] = " "; $config[ 'toolbar2' ] = " "; $config[ 'readonly' ] = "1"; } return $config; } public function filter_original_editor_textarea( $content ) { if ( strpos( $content, 'id="wp-original_' ) !== false ) { $content = str_replace( '