- 상태
- 개발자가 해결함
- 해결된 버전
- 2.30.3.
- 관련 플러그인/테마
- AffiliateWP
- 주제 태그
- Compatibility
문제 개요
AffiliateWP를 AffiliateWP Portal 애드온 및 WPML과 함께 사용할 때, Affiliate Portal에 추가된 사용자 정의 메뉴 링크가 두 언어로 표시되지만 해당 레이블은 번역할 수 없습니다. 이러한 사용자 정의 링크 레이블을 번역할 수 있는 내장 옵션은 없습니다.
임시 해결 방법
진행하기 전에 사이트의 전체 사이트 백업을 완료했는지 확인하세요.
- …/wp-content/plugins/affiliatewp-affiliate-portal/includes/core/class-menu-links.php 파일을 여세요.
- 102번째 줄을 찾으세요.
- 다음을:
// filter only menu links with a page. $menu_links = array_filter( $menu_links, function( $menu_link) { return ! empty( $menu_link['id'] ); } ); - 다음으로 바꾸세요:
// filter only menu links with a page. $menu_links = array_filter( $menu_links, function( $menu_link) { return ! empty( $menu_link['id'] ); } ); // WPML Workaround for compsupp-8049 - Register menu links labels with WPML foreach ( $menu_links as $index => &$link ) { if ( ! empty( $link['label'] ) ) { do_action( 'wpml_register_single_string', 'affiliatewp-portal-menu', 'portal_menu_link_label_' . $index, $link['label'] ); $link['label'] = apply_filters( 'wpml_translate_single_string', $link['label'], 'affiliatewp-portal-menu', 'portal_menu_link_label_' . $index ); } } - AffiliateWP > 설정 > Affiliate Portal로 이동하여 설정을 다시 저장하세요.
- 그런 다음 WPML > 문자열 번역으로 이동하여 사용자 정의 메뉴 링크 레이블을 번역하세요.