이 사용자는 즐겨찾는 주제가 없습니다.
즐겨찾는 포럼 주제
생성한 포럼 주제
상태 |
주제
|
후원자 | 의견 | 게시물 | 최신 |
---|---|---|---|---|---|
WP All Import / Toolset nested repeatable groups / WPML
1
2
3
시작: giuseppeG-10
위치: Assistenza in italiano
Problem: wp-content/plugins/wpai-toolset-types-addon/src/fields/fields/FieldRepeatableGroup.php 2. Locate the following code: if ($row_id && !is_wp_error($row_id)) { $groupRow = get_post($row_id); and modify it to: if ($row_id && !is_wp_error($row_id)) { do_action( 'tweak_wpai_import_rfg', $row_id, $k, $importData['current_xml_node'] ); // ADDED BY WPML SUPPORT<br /> $groupRow = get_post($row_id); 3. In the functions.php file of your theme, add the following snippet: /** * Function to copy language-related fields required by * WPML Export & Import plugin to Types RFG posts. * add_action( 'tweak_wpai_import_rfg', 'tweak_wpai_import_rfg_cb', 10, 3 ); */ function tweak_wpai_import_rfg_cb( $row_id, $k, $current_xml_node ){ if ( isset( $current_xml_node['_wpml_import_translation_group'] ) && isset( $current_xml_node['_wpml_import_language_code'] ) && isset( $current_xml_node['_wpml_import_source_language_code'] ) ) { $current_xml_node['_wpml_import_source_language_code'] = is_array( $current_xml_node['_wpml_import_source_language_code'] ) ? '' : $current_xml_node['_wpml_import_source_language_code']; add_post_meta( $row_id, '_wpml_import_translation_group', $current_xml_node['_wpml_import_translation_group'] . "__$k", true ); add_post_meta( $row_id, '_wpml_import_language_code', $current_xml_node['_wpml_import_language_code'], true ); add_post_meta( $row_id, '_wpml_import_source_language_code', $current_xml_node['_wpml_import_source_language_code'], true ); } } This workaround has been tested on a test site and works if the files are configured for WPML Export & Import and if you run the translation process after importing the files in WPML > Export & Import. Please note that this is a workaround and WP All Import no longer supports the extension for Toolset, so it may not work in the future. At this time, we do not plan to introduce this feature in Toolset or WPML. If this solution does not resolve your issue or seems irrelevant, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket. |
|
0 | 39 | 1 주, 2 일 전에 |