From 0a0b0e91cf118693daceeab4c12211c20c1bb697 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 16 Jan 2024 21:45:12 +0000 Subject: [PATCH] I18N: Correctly invalidate language file paths in `WP_Textdomain_Registry`. Since the cache key in `::get_language_files_from_path()` is based on a path that always includes a trailing slash, the path in `::invalidate_mo_files_cache()` should include the trailing slash as well. Includes adjusting the test expectations accordingly. Follow-up to [57287], [57290], [57298]. See #58919. Built from https://develop.svn.wordpress.org/trunk@57299 git-svn-id: http://core.svn.wordpress.org/trunk@56805 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-textdomain-registry.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-textdomain-registry.php b/wp-includes/class-wp-textdomain-registry.php index 4121ecb091..8ff8ad0ae2 100644 --- a/wp-includes/class-wp-textdomain-registry.php +++ b/wp-includes/class-wp-textdomain-registry.php @@ -237,13 +237,13 @@ class WP_Textdomain_Registry { foreach ( $translation_types as $type ) { switch ( $type ) { case 'plugin': - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins' ), 'translations' ); + wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/plugins/' ), 'translations' ); break; case 'theme': - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes' ), 'translations' ); + wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/themes/' ), 'translations' ); break; default: - wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR ), 'translations' ); + wp_cache_delete( 'cached_mo_files_' . md5( WP_LANG_DIR . '/' ), 'translations' ); break; } } diff --git a/wp-includes/version.php b/wp-includes/version.php index e57f3a16a0..b6b2e8837e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57298'; +$wp_version = '6.5-alpha-57299'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.