Skip to content

Commit 3016d48

Browse files
committed
Upgrade/Install: Remove bundled theme files from $_old_files.
Because themes are updated independently of Core updates, any deleted files from bundled themes should not be included in the `$_old_files` list. Any file included in this list is deleted on update, which could cause problems for sites with a given theme active if the removed files were required in earlier versions of that theme and that theme is not updated at the same time. Props desrosj, costdev, SergeyBiryukov. Fixes #56936. git-svn-id: https://develop.svn.wordpress.org/trunk@54849 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0cb8475 commit 3016d48

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/wp-admin/includes/update-core.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
/**
1111
* Stores files to be deleted.
1212
*
13+
* Bundled theme files should not be included in this list.
14+
*
1315
* @since 2.7.0
1416
*
1517
* @global array $_old_files
@@ -843,11 +845,7 @@
843845
'wp-includes/blocks/tag-cloud/editor.min.css',
844846
'wp-includes/blocks/tag-cloud/editor-rtl.css',
845847
'wp-includes/blocks/tag-cloud/editor-rtl.min.css',
846-
// 6.0
847-
'wp-content/themes/twentytwentytwo/assets/fonts/LICENSE.md',
848848
// 6.1
849-
'wp-content/themes/twentytwentyone/assets/sass/05-blocks/spacer/_style.scss',
850-
'wp-content/themes/twentytwentyone/assets/sass/05-blocks/spacer',
851849
'wp-includes/blocks/post-comments.php',
852850
'wp-includes/blocks/post-comments/block.json',
853851
'wp-includes/blocks/post-comments/editor.css',

0 commit comments

Comments
 (0)