Plugin Directory

Changeset 3373443


Ignore:
Timestamp:
10/06/2025 06:52:30 AM (5 months ago)
Author:
smartling
Message:

Update to v 4.3.6

Location:
smartling-connector/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • smartling-connector/trunk/inc/Smartling/Helpers/AbsoluteLinkedAttachmentCoreHelper.php

    r2998712 r3373443  
    218218        if (true === FileHelper::testFile($localOriginalFile)) {
    219219            $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
    220225            $possibleId = $this->lookForDirectGuidEntry($url);
    221226            if (null === $possibleId && $this->fileLooksLikeThumbnail($originalPathinfo['filename'])) {
     
    229234                $this->getLogger()->info(vsprintf('No \'attachment\' found for url=%s', [$url]));
    230235            }
     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            }
    231239
    232240            return $possibleId;
  • smartling-connector/trunk/inc/Smartling/Helpers/WordpressFunctionProxyHelper.php

    r3338937 r3373443  
    2222    }
    2323
     24    public function attachment_url_to_postid()
     25    {
     26        return attachment_url_to_postid(...func_get_args());
     27    }
     28
    2429    public function get_home_url()
    2530    {
  • smartling-connector/trunk/inc/Smartling/WP/View/ConfigurationProfileForm.php

    r3338937 r3373443  
    729729                            ]
    730730                        ),
    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>
    733771                </td>
    734772            </tr>
  • smartling-connector/trunk/readme.txt

    r3366226 r3373443  
    55Tested up to: 6.6.2
    66Requires PHP: 8.0
    7 Stable tag: 4.3.5
     7Stable tag: 4.3.6
    88License: GPLv2 or later
    99
     
    6363
    6464== 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
    6569= 4.3.5 =
    6670* Added support for ACF metafields that have multiple relations
  • smartling-connector/trunk/smartling-connector.php

    r3366226 r3373443  
    1212 * Plugin URI:        https://www.smartling.com/products/automate/integrations/wordpress/
    1313 * Description:       Integrate your WordPress site with Smartling to upload your content and download translations.
    14  * Version:           4.3.5
     14 * Version:           4.3.6
    1515 * Author:            Smartling
    1616 * Author URI:        https://www.smartling.com
Note: See TracChangeset for help on using the changeset viewer.