Support

Account

Home Forums Bug Reports ACF & qTranslate Reply To: ACF & qTranslate

  • You can monkey patch qTranslate to fix the issue.
    https://github.com/funkjedi/acf-qtranslate/issues/2#issuecomment-37612918

    add_action('plugins_loaded', 'qtranslate_monkey_patch', 3);
    function qtranslate_monkey_patch() {
    	global $q_config;
    	if (strpos($q_config['js']['qtrans_hook_on_tinyMCE'], 'ed.editorId.match(/^qtrans_/)') === false) {
    		$q_config['js']['qtrans_hook_on_tinyMCE'] = preg_replace("/(qtrans_save\(switchEditors\.pre_wpautop\(o\.content\)\);)/", "if (ed.editorId.match(/^qtrans_/)) \$1", $q_config['js']['qtrans_hook_on_tinyMCE']);
    	}
    }