WPML
状态
未解决
报告针对
WPML Multilingual CMS 4.6.6
主题标签
Bug

问题概述

使用 WPML,您可以向站点添加各个译者作为用户,分配语言对,然后在翻译管理中为他们分配翻译任务。但是,具有 WordPress 编辑角色的译者能够将文章复制到不在其分配的语言对内的语言中。

临时解决方法

在继续操作之前,请确保对您的网站进行完整备份


  • 打开 …/wp-content/plugins/sitepress-multilingual-cms/menu/post-menus/post-edit-screen/wpml-meta-boxes-post-edit-html.class.php 文件。

  • 找到第 524 行。

  • 将: if ( $translation_status && $translation_status < ICL_TM_COMPLETE ) {

  • 替换为: $lang_from = trim(implode(array_keys($translations)));
    $lang_to = $lang["code"];
    $userlanguages = get_user_meta(get_current_user_id(),$this->sitepress->wpdb()->prefix . 'language_pairs',true );
    foreach ($userlanguages as $from => $to ) {
    $set_to_disable = true;
    if ($lang_from == $from){
    if ($lang_to == trim(implode(array_keys($to)))){
    $set_to_disable = false;
    }
    }
    }
    if ( $translation_status && $translation_status < ICL_TM_COMPLETE || $set_to_disable ) {

所有已知问题 →