Skip to content

Commit d373e6e

Browse files
Upgrade/Install: Skip any node_modules directories when removing Genericons example.html files on update.
This can significantly reduce the time required to complete the process in a development environment. Follow-up to [32386]. Props bobbingwide, afragen, desrosj, SergeyBiryukov. Fixes #52765. git-svn-id: https://develop.svn.wordpress.org/trunk@51521 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 812d110 commit d373e6e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1656,6 +1656,13 @@ function _upgrade_422_find_genericons_files_in_folder( $directory ) {
16561656
}
16571657

16581658
$dirs = glob( $directory . '*', GLOB_ONLYDIR );
1659+
$dirs = array_filter(
1660+
$dirs,
1661+
function( $dir ) {
1662+
// Skip any node_modules directories.
1663+
return false === strpos( $dir, 'node_modules' );
1664+
}
1665+
);
16591666

16601667
if ( $dirs ) {
16611668
foreach ( $dirs as $dir ) {

0 commit comments

Comments
 (0)