mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-01 19:24:34 +00:00
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. git-svn-id: https://develop.svn.wordpress.org/trunk@57299 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user