Go to file
Dominik Schilling (ocean90) e2f67203bb I18N: Add an additional caching layer for `_load_textdomain_just_in_time()`.
Previously, if no translation files exist for a text domain, `_load_textdomain_just_in_time()` went through the entire process each time it was called. This results in an increased call to `get_locale()` and its `locale` filter.
This change splits the logic into `_get_path_to_translation()` and `_get_path_to_translation_from_lang_dir()`. The former, which is used by `_load_textdomain_just_in_time()`, caches the result of the latter. It also removes some non-working code from `WP_Locale_Switcher::load_translations()`.

Props jrf, swissspidy, sharkomatic, ocean90.
Fixes #37997.

git-svn-id: https://develop.svn.wordpress.org/trunk@39330 602fd350-edb4-49c9-b593-d223f7449a82
2016-11-21 16:06:38 +00:00
src I18N: Add an additional caching layer for `_load_textdomain_just_in_time()`. 2016-11-21 16:06:38 +00:00
tests I18N: Add an additional caching layer for `_load_textdomain_just_in_time()`. 2016-11-21 16:06:38 +00:00
tools/i18n DOCS: Replace HTTP links with HTTPS. 2016-06-10 04:49:09 +00:00
.editorconfig
.gitignore Revert [38401] after [38480]. 2016-09-06 18:12:09 +00:00
.jshintrc Build: Prevent non-breaking spaces from accidentally being inserted into JavaScript files. 2015-11-12 12:04:55 +00:00
.travis.yml Build/Test Tools: Ensure PHP 7.1 is tested on Travis. 2016-08-17 20:45:07 +00:00
Gruntfile.js Build/Test tools: Add "apply" as alias for "patch" 2016-11-10 03:21:39 +00:00
package.json Revert [39118] due to incompatibility with node v0.10.x 2016-11-03 06:08:34 +00:00
phpunit.xml.dist oEmbed: Remove the oEmbed provider unit tests. 2016-10-20 09:15:10 +00:00
wp-cli.yml Remove debug mode from WP-CLI by default, as it now outputs too much debugging information to be of use during normal development. 2015-11-28 18:36:06 +00:00
wp-config-sample.php Lightly clean up and improve inline documentation in wp-config-sample.php. 2015-05-10 00:05:30 +00:00
wp-tests-config-sample.php Tests: Use a minimal theme for tests. 2016-10-21 11:02:37 +00:00