From 6bc60dcc70e9416c8320822ee91a66dfa05cd9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Per=20S=C3=B8derlind?= Date: Wed, 28 Feb 2024 00:22:00 +0100 Subject: [PATCH] Update README.md with plugin information and compatibility note --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4232892..559b3b7 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # A Faster load_textdomain +> **NOTE** This plugin is not needed if you are running WordPress 6.5 or later, as the functionality [is built into WordPress core](https://make.wordpress.org/core/2024/02/27/i18n-improvements-6-5-performant-translations/). If you need to generate translation in the new .l10n.php format, use the Performant Translations plugin instead. + This is a WordPress plugin that caches the .mo file as an PHP array, and [include](https://www.php.net/manual/en/function.include.php) the array instead of the .mo file. In theory, nothing is faster in PHP than loading and executing another PHP file. ## Installation @@ -10,7 +12,7 @@ Either (recommended): Or: -- Search for "[A faster load_textdomain](https://wordpress.org/plugins/a-faster-load-textdomain/)" and install with the WordPress plugin installer. +- Search for "[A faster load_textdomain](https://wordpress.org/plugins/a-faster-load-textdomain/)" and install with the WordPress plugin installer. - (Network) Activate the plugin through the 'Plugins' menu in WordPress. It's also possible to install the plugin via Composer: `composer require soderlind/a-faster-load-textdomain` @@ -23,7 +25,6 @@ If you have a plugin or theme that loads a textdomain, e.g. `load_textdomain( 't 2. If the PHP version exists, [include](https://www.php.net/manual/en/function.include.php) the file. 3. If the PHP version doesn't exist, load the .mo file, and save the file as an PHP array in `wp-content/cache/a-faster-load-textdomain/` directory. - ```mermaid graph TD A[Start] --> B{Look for PHP version of .mo file in cache directory}