From b57c822afd7d3b60ea207310a77dbf4bca641720 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 30 Jan 2024 10:31:00 +0000 Subject: [PATCH] I18N: Delete `.l10n.php` files when deleting a theme. Follow-up to [57337] where this was already added for plugins. See #59656. git-svn-id: https://develop.svn.wordpress.org/trunk@57382 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/theme.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/wp-admin/includes/theme.php b/src/wp-admin/includes/theme.php index 91e92995ec..70abab68ad 100644 --- a/src/wp-admin/includes/theme.php +++ b/src/wp-admin/includes/theme.php @@ -114,6 +114,7 @@ function delete_theme( $stylesheet, $redirect = '' ) { foreach ( $translations as $translation => $data ) { $wp_filesystem->delete( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '.po' ); $wp_filesystem->delete( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '.mo' ); + $wp_filesystem->delete( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '.l10n.php' ); $json_translation_files = glob( WP_LANG_DIR . '/themes/' . $stylesheet . '-' . $translation . '-*.json' ); if ( $json_translation_files ) {