Make WordPress Core


Ignore:
Timestamp:
09/30/2024 02:57:32 PM (2 years ago)
Author:
swissspidy
Message:

I18N: Fix script languages path for themes.

Remove hardcoded path added in [57922] which ignored the fact that themes can also use script translations.
They should not be affected even if plugins are installed outside the typical wp-content/plugins location.

Props itapress, swissspidy.
Fixes #62016.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/l10n/loadScriptTextdomain.php

    r57922 r59126  
    1515         * @ticket 49145
    1616         * @ticket 60891
     17         * @ticket 62016
    1718         *
    1819         * @dataProvider data_resolve_relative_path
     
    136137                                ),
    137138                        ),
     139                        // @ticket 62016
     140                        array(
     141                                '/languages/themes/internationalized-theme-en_US-2f86cb96a0233e7cb3b6f03ad573be0b.json',
     142                                'theme-with-script-translations',
     143                                '/wp-content/themes/my-theme/js/script.js',
     144                                'internationalized-theme',
     145                        ),
    138146                );
    139147        }
Note: See TracChangeset for help on using the changeset viewer.