تخطي إلى المحتوى تخطي إلى الشريط الجانبي

Open

Reported for: Advanced Custom Fields Multilingual 2.2.4

Topic Tags: Compatibility

Overview of the issue

When you use Advanced Custom Fields Link or URL fields together with Advanced Custom Fields Multilingual in the “Same fields across languages” translation mode, external links may not appear in the Advanced Translation Editor for translation.

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open your functions.php file.
  • Add the following snippet:
    add_filter( 'acfml_field_group_mode_field_translation_preference', function( $fieldTranslationPreference, $groupMode, $field ) {
        $fieldType = $field['type'] ?? null;
      
        if ( 'link' === $fieldType ) {
            return 2; // `WPML_TRANSLATE_CUSTOM_FIELD`.
        }
      
        return $fieldTranslationPreference;
    }, 10, 3 );
    

4 ردود إلى “Advanced Custom Fields - External links are not translatable in “Same fields across languages” mode”

اترك ردًا

الرجاء البقاء في الموضوع واحترام الآخرين. إذا كنت بحاجة إلى مساعدة في مشكلات غير متعلقة بهذا المنشور، استخدم منتدى الدعم الخاص بنا لبدء محادثة أو تقديم تذكرة.

يمكنك استخدام هذه الوسوم:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>