diff -r be944660c56a -r 3d72ae0968f4 wp/wp-admin/includes/update-core.php --- a/wp/wp-admin/includes/update-core.php Wed Sep 21 18:19:35 2022 +0200 +++ b/wp/wp-admin/includes/update-core.php Tue Sep 27 16:37:53 2022 +0200 @@ -826,6 +826,25 @@ 'wp-includes/css/dist/editor/editor-styles.min.css', 'wp-includes/css/dist/editor/editor-styles-rtl.css', 'wp-includes/css/dist/editor/editor-styles-rtl.min.css', + // 5.9 + 'wp-includes/blocks/heading/editor.css', + 'wp-includes/blocks/heading/editor.min.css', + 'wp-includes/blocks/heading/editor-rtl.css', + 'wp-includes/blocks/heading/editor-rtl.min.css', + 'wp-includes/blocks/post-content/editor.css', + 'wp-includes/blocks/post-content/editor.min.css', + 'wp-includes/blocks/post-content/editor-rtl.css', + 'wp-includes/blocks/post-content/editor-rtl.min.css', + 'wp-includes/blocks/query-title/editor.css', + 'wp-includes/blocks/query-title/editor.min.css', + 'wp-includes/blocks/query-title/editor-rtl.css', + 'wp-includes/blocks/query-title/editor-rtl.min.css', + 'wp-includes/blocks/tag-cloud/editor.css', + 'wp-includes/blocks/tag-cloud/editor.min.css', + 'wp-includes/blocks/tag-cloud/editor-rtl.css', + 'wp-includes/blocks/tag-cloud/editor-rtl.min.css', + // 6.0 + 'wp-content/themes/twentytwentytwo/assets/fonts/LICENSE.md', ); /** @@ -864,6 +883,7 @@ 'themes/twentynineteen/' => '5.0', 'themes/twentytwenty/' => '5.3', 'themes/twentytwentyone/' => '5.6', + 'themes/twentytwentytwo/' => '5.9', ); /** @@ -965,7 +985,7 @@ /* * Import $wp_version, $required_php_version, and $required_mysql_version from the new version. - * DO NOT globalise any variables imported from `version-current.php` in this function. + * DO NOT globalize any variables imported from `version-current.php` in this function. * * BC Note: $wp_filesystem->wp_content_dir() returned unslashed pre-2.8. */ @@ -976,7 +996,7 @@ return new WP_Error( 'copy_failed_for_version_file', - __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), + __( 'The update cannot be installed because some files could not be copied. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); } @@ -1241,7 +1261,7 @@ // If we don't have enough free space, it isn't worth trying again. // Unlikely to be hit due to the check in unzip_file(). - $available_space = @disk_free_space( ABSPATH ); + $available_space = function_exists( 'disk_free_space' ) ? @disk_free_space( ABSPATH ) : false; if ( $available_space && $total_size >= $available_space ) { $result = new WP_Error( 'disk_full', __( 'There is not enough free disk space to complete the update.' ) ); @@ -1397,8 +1417,8 @@ // Deactivate the REST API plugin if its version is 2.0 Beta 4 or lower. _upgrade_440_force_deactivate_incompatible_plugins(); - // Deactivate the Gutenberg plugin if its version is 10.7 or lower. - _upgrade_580_force_deactivate_incompatible_plugins(); + // Deactivate the Gutenberg plugin if its version is 11.8 or lower. + _upgrade_590_force_deactivate_incompatible_plugins(); // Upgrade DB with separate request. /** This filter is documented in wp-admin/includes/update-core.php */ @@ -1536,7 +1556,7 @@ * @since 3.3.0 * * @global string $wp_version The WordPress version string. - * @global string $pagenow + * @global string $pagenow The filename of the current screen. * @global string $action * * @param string $new_version @@ -1656,6 +1676,13 @@ } $dirs = glob( $directory . '*', GLOB_ONLYDIR ); + $dirs = array_filter( + $dirs, + static function( $dir ) { + // Skip any node_modules directories. + return false === strpos( $dir, 'node_modules' ); + } + ); if ( $dirs ) { foreach ( $dirs as $dir ) { @@ -1677,15 +1704,16 @@ } /** + * @access private * @ignore - * @since 5.8.0 + * @since 5.9.0 */ -function _upgrade_580_force_deactivate_incompatible_plugins() { - if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '10.7', '<=' ) ) { +function _upgrade_590_force_deactivate_incompatible_plugins() { + if ( defined( 'GUTENBERG_VERSION' ) && version_compare( GUTENBERG_VERSION, '11.9', '<' ) ) { $deactivated_gutenberg['gutenberg'] = array( 'plugin_name' => 'Gutenberg', 'version_deactivated' => GUTENBERG_VERSION, - 'version_compatible' => '10.8', + 'version_compatible' => '11.9', ); if ( is_plugin_active_for_network( 'gutenberg/gutenberg.php' ) ) { $deactivated_plugins = get_site_option( 'wp_force_deactivated_plugins', array() );