Changeset 3373443
- Timestamp:
- 10/06/2025 06:52:30 AM (5 months ago)
- Location:
- smartling-connector/trunk
- Files:
-
- 5 edited
-
inc/Smartling/Helpers/AbsoluteLinkedAttachmentCoreHelper.php (modified) (2 diffs)
-
inc/Smartling/Helpers/WordpressFunctionProxyHelper.php (modified) (1 diff)
-
inc/Smartling/WP/View/ConfigurationProfileForm.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
-
smartling-connector.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
smartling-connector/trunk/inc/Smartling/Helpers/AbsoluteLinkedAttachmentCoreHelper.php
r2998712 r3373443 218 218 if (true === FileHelper::testFile($localOriginalFile)) { 219 219 $originalPathinfo = pathinfo($localOriginalFile); 220 $wpAttachmentUrlToPostId = $this->wordpressProxy->attachment_url_to_postid($url); 221 if ($wpAttachmentUrlToPostId !== 0) { 222 return $wpAttachmentUrlToPostId; 223 } 224 // TODO revisit after second half of 2026, see https://smartling.atlassian.net/browse/WP-963 220 225 $possibleId = $this->lookForDirectGuidEntry($url); 221 226 if (null === $possibleId && $this->fileLooksLikeThumbnail($originalPathinfo['filename'])) { … … 229 234 $this->getLogger()->info(vsprintf('No \'attachment\' found for url=%s', [$url])); 230 235 } 236 if ($possibleId !== null) { 237 $this->getLogger()->debug("attachment_url_to_postid result for url=$url was 0, legacy code determined possible_id=$possibleId"); 238 } 231 239 232 240 return $possibleId; -
smartling-connector/trunk/inc/Smartling/Helpers/WordpressFunctionProxyHelper.php
r3338937 r3373443 22 22 } 23 23 24 public function attachment_url_to_postid() 25 { 26 return attachment_url_to_postid(...func_get_args()); 27 } 28 24 29 public function get_home_url() 25 30 { -
smartling-connector/trunk/inc/Smartling/WP/View/ConfigurationProfileForm.php
r3338937 r3373443 729 729 ] 730 730 ), 731 ['name' => 'smartling_settings[' . ConfigurationProfileFormController::FILTER_FIELD_NAME_REGEXP . ']']) 732 ?> 731 [ 732 'id' => 'filter-field-name-regexp', 733 'name' => 'smartling_settings[' . ConfigurationProfileFormController::FILTER_FIELD_NAME_REGEXP . ']' 734 ] 735 ) 736 ?> 737 <script> 738 document.getElementById('filter-field-name-regexp').addEventListener('change', function (e) { 739 for (const input of [ 740 document.getElementById('filter-skip'), 741 document.getElementById('filter-copy-by-name'), 742 ]) { 743 input.value = input.value.split('\n') 744 .map(e.target.value === '0' ? function removeRegexStartAndEnd (value) { 745 if (value.length > 0) { 746 if (value[0] === '^') { 747 value = value.substring(1); 748 } 749 if (value[value.length - 1] === '$') { 750 value = value.substring(0, value.length - 1); 751 } 752 } 753 754 return value 755 } : function addRegexStartAndEnd (value) { 756 if (value.length > 0) { 757 if (value[0] !== '^') { 758 value = '^' + value; 759 } 760 if (value[value.length - 1] !== '$') { 761 value = value + '$'; 762 } 763 } 764 765 return value; 766 }) 767 .join('\n'); 768 } 769 }) 770 </script> 733 771 </td> 734 772 </tr> -
smartling-connector/trunk/readme.txt
r3366226 r3373443 5 5 Tested up to: 6.6.2 6 6 Requires PHP: 8.0 7 Stable tag: 4.3. 57 Stable tag: 4.3.6 8 8 License: GPLv2 or later 9 9 … … 63 63 64 64 == Changelog == 65 = 4.3.6 = 66 * Improved replacement of attachment URLs in translated content by using WordPress built-in attachment_url_to_postid() function 67 * Exclude and Copy fields by field name will now change to a stricter regex when changing the "Treat Exclude fields by field name and Copy fields by field name as regex" setting 68 65 69 = 4.3.5 = 66 70 * Added support for ACF metafields that have multiple relations -
smartling-connector/trunk/smartling-connector.php
r3366226 r3373443 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.3. 514 * Version: 4.3.6 15 15 * Author: Smartling 16 16 * Author URI: https://www.smartling.com
Note: See TracChangeset
for help on using the changeset viewer.