- 상태
- 해결됨
- 해결된 버전
- WPML 4.7.5
- 관련 플러그인/테마
- Avada
- 주제 태그
- Compatibility
문제 개요
Avada 테마를 사용하는 경우, Avada Forms 내에 설정된 알림 값을 고급 번역 에디터에서 번역할 수 없습니다.
임시 해결 방법
계속 진행하기 전에 사이트의 전체 백업이 있는지 확인하세요.
- 테마의 functions.php 파일을 여세요.
- 다음 코드를 추가하세요.
/* WPML Updated workaround for AVADA REF: compsupp-6224 */ add_filter( 'wpml_decode_custom_field', 'wpmld_compsupp6224_decode', 10, 2 ); function wpmld_compsupp6224_decode( $custom_field_val, $custom_field_name ) { if ( $custom_field_name === '_fusion' ) { $custom_field_val['notifications'] = json_decode($custom_field_val['notifications']); foreach($custom_field_val['notifications'] as $key => $value) { $custom_field_val['notifications'][$key] = (array)$value; } } return $custom_field_val; } add_filter( 'wpml_encode_custom_field', 'wpmld_compsupp6224_encode', 10, 2 ); function wpmld_compsupp6224_encode( $custom_field_val, $custom_field_name ) { if ( $custom_field_name === '_fusion' ) { $custom_field_val['notifications'] = json_encode($custom_field_val['notifications']); } return $custom_field_val; } - WPML > 설정 > 사용자 정의 XML 구성 페이지로 이동하세요.
- 다음 XML을 추가하세요.
<wpml-config> <custom-fields-texts> <key name="_fusion"> <key name="page_title_custom_text" /> <key name="page_title_custom_subheader" /> <key name="video" /> <key name="link_icon_url" /> <key name="video_url" /> <key name="project_url" /> <key name="project_url_text" /> <key name="copy_url" /> <key name="copy_url_text" /> <key name="youtube_id" /> <key name="heading" /> <key name="caption" /> <key name="button_1" /> <key name="button_2" /> <key name="vimeo_id" /> <key name="notifications"> <key name="*"> <key name="label"/> <key name="email_subject"/> <key name="email_from"/> <key name="email_from_id"/> <key name="email_reply_to"/> <key name="email_message"/> <key name="email_from"/> <key name="email_from_id"/> </key> </key> </key> </custom-fields-texts> </wpml-config> - 양식에 간단한 알림을 추가하고 다시 번역하세요.