From 24565dc6b7d74bf56b1801e5f2db752c88efc032 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 30 Jan 2024 10:32:12 +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. Built from https://develop.svn.wordpress.org/trunk@57382 git-svn-id: http://core.svn.wordpress.org/trunk@56888 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/theme.php | 1 + wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 91e92995ec..70abab68ad 100644 --- a/wp-admin/includes/theme.php +++ b/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 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 5faf27afe4..2e40280f81 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.5-alpha-57381'; +$wp_version = '6.5-alpha-57382'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.