Changeset 3340860
- Timestamp:
- 08/07/2025 10:02:48 AM (8 months ago)
- Location:
- smartling-connector/trunk
- Files:
-
- 1 added
- 6 edited
-
inc/Smartling/Base/SmartlingCore.php (modified) (2 diffs)
-
inc/Smartling/ContentTypes/Elementor/Elements/SocialIcons.php (added)
-
inc/Smartling/ContentTypes/ExternalContentElementor.php (modified) (1 diff)
-
inc/Smartling/Models/RelatedContentInfo.php (modified) (1 diff)
-
inc/Smartling/WP/Table/QueueManagerTableWidget.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
smartling-connector.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smartling-connector/trunk/inc/Smartling/Base/SmartlingCore.php
r3338937 r3340860 78 78 $submission = $this->prepareTargetContent($submission); 79 79 $entity = $this->getContentHelper()->readTargetContent($submission); 80 $content = $entity->toArray(); 81 foreach ($content as $key => $value) { 80 $entityStrings = $entity->toArray(); 81 $metadata = $this->getContentHelper()->readTargetMetadata($submission); 82 $content = ['entity' => $entityStrings, 'meta' => $metadata]; 83 $content = $this->externalContentManager->setExternalContent($content, $content, $submission); 84 foreach ($entityStrings as $key => $value) { 82 85 if (array_key_exists($key, $lockedFields['entity'])) { 83 $ content[$key] = $lockedFields['entity'][$key];86 $entityStrings[$key] = $lockedFields['entity'][$key]; 84 87 continue; 85 88 } … … 88 91 $value = $this->postContentHelper->applyContentWithBlockLocks($target['entity']['post_content'], $value); 89 92 } 90 $ content[$key] = $this->gutenbergBlockHelper->replacePostTranslateBlockContent($value, $value, $submission);93 $entityStrings[$key] = $this->gutenbergBlockHelper->replacePostTranslateBlockContent($value, $value, $submission); 91 94 } 92 95 } 93 $ content = apply_filters(ExportedAPI::FILTER_BEFORE_CLONE_CONTENT_WRITTEN, $content, $submission);94 $this->getContentHelper()->writeTargetContent($submission, $entity->fromArray($ content));95 96 $metadata = [];96 $entityStrings = apply_filters(ExportedAPI::FILTER_BEFORE_CLONE_CONTENT_WRITTEN, $entityStrings, $submission); 97 $this->getContentHelper()->writeTargetContent($submission, $entity->fromArray($entityStrings)); 98 99 $metadata = $content['meta']; 97 100 foreach ($lockedFields['meta'] as $key => $value) { 98 101 $metadata[$key] = $value; -
smartling-connector/trunk/inc/Smartling/ContentTypes/ExternalContentElementor.php
r3333320 r3340860 26 26 use LoggerSafeTrait; 27 27 28 p rotectedconst META_FIELD_NAME = '_elementor_data';28 public const META_FIELD_NAME = '_elementor_data'; 29 29 private const META_CONDITIONS_NAME = '_elementor_conditions'; 30 30 -
smartling-connector/trunk/inc/Smartling/Models/RelatedContentInfo.php
r3096059 r3340860 65 65 { 66 66 $result = clone $this; 67 $result->info[$containerId] = array_merge($result->info[$containerId] ?? [], $info->info);67 $result->info[$containerId] = $this->arrayMergePreserveKeys($this->info, $info->info); 68 68 69 69 return $result; 70 } 71 72 /** 73 * Elementor sometimes generates ids as numerical strings e.g. "12345678" 74 * array_merge and array_merge_recursive don't preserve numerical keys 75 */ 76 private function arrayMergePreserveKeys(array $array1, array $array2): array 77 { 78 foreach ($array2 as $key => $value) { 79 if (is_array($value) && isset($array1[$key]) && is_array($array1[$key])) { 80 $array1[$key] = $this->arrayMergePreserveKeys($array1[$key], $value); 81 } else { 82 $array1[$key] = $value; 83 } 84 } 85 return $array1; 70 86 } 71 87 -
smartling-connector/trunk/inc/Smartling/WP/Table/QueueManagerTableWidget.php
r3333320 r3340860 176 176 } 177 177 178 private function getCheckStatusCronActionCell( ConfigurationProfileEntity $profile, int $count): string178 private function getCheckStatusCronActionCell(?ConfigurationProfileEntity $profile, int $count): string 179 179 { 180 180 if ($count === 0) { -
smartling-connector/trunk/readme.txt
r3338937 r3340860 5 5 Tested up to: 6.6.2 6 6 Requires PHP: 8.0 7 Stable tag: 4. 2.07 Stable tag: 4.3.0 8 8 License: GPLv2 or later 9 9 … … 63 63 64 64 == Changelog == 65 = 4.3.0 = 66 * Cloning should now handle relations for supported external plugins 67 * Added support for Elementor social icons widget 68 * Fixed issue where supported elementor content was partially translated 69 * Fixed fatal error on the Settings page when no configuration profiles are present 70 65 71 = 4.2.0 = 66 72 * Fixed cloned items having the same guid field -
smartling-connector/trunk/smartling-connector.php
r3338937 r3340860 12 12 * Plugin URI: https://www.smartling.com/products/automate/integrations/wordpress/ 13 13 * Description: Integrate your WordPress site with Smartling to upload your content and download translations. 14 * Version: 4. 2.014 * Version: 4.3.0 15 15 * Author: Smartling 16 16 * Author URI: https://www.smartling.com
Note: See TracChangeset
for help on using the changeset viewer.