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
This commit is contained in:
Pascal Birchler 2024-01-30 10:32:12 +00:00
parent 2e7358dec6
commit 24565dc6b7
2 changed files with 2 additions and 1 deletions

View File

@ -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 ) {

View File

@ -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.