From 1499d5e8d2ea889ad053b9a38490eff1d079d219 Mon Sep 17 00:00:00 2001 From: Peter Wilson Date: Tue, 21 Oct 2025 04:33:29 +0000 Subject: [PATCH] Upgrade/Install: Revert relocation of Hello Dolly plugin. Reverts Hello Dolly changes moving the plugin to a containing folder. Removes the `upgrade_690()` function in it's entirety as the upgrade routine is no longer required. Fully reverted commits: [60666], [60670], [60716], [60725]; partially reverts [60721]. Porps johnbillion, whyisjake, SirLouen, mindctrl, afragen, jorbin, Otto42, swissspidy, welcher, davidbaumwald. See #53323. Built from https://develop.svn.wordpress.org/trunk@61006 git-svn-id: http://core.svn.wordpress.org/trunk@60342 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/plugin.php | 6 ++++ wp-admin/includes/update-core.php | 3 -- wp-admin/includes/upgrade.php | 29 ------------------- .../plugins/{hello-dolly => }/hello.php | 0 wp-includes/class-wp-plugin-dependencies.php | 3 ++ wp-includes/version.php | 2 +- 6 files changed, 10 insertions(+), 33 deletions(-) rename wp-content/plugins/{hello-dolly => }/hello.php (100%) diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index ee1970ea38..300edff42f 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -153,6 +153,8 @@ function _get_plugin_data_markup_translate( $plugin_file, $plugin_data, $markup load_plugin_textdomain( $textdomain, false, dirname( $plugin_file ) ); } } + } elseif ( 'hello.php' === basename( $plugin_file ) ) { + $textdomain = 'default'; } if ( $textdomain ) { foreach ( array( 'Name', 'PluginURI', 'Description', 'Author', 'AuthorURI', 'Version' ) as $field ) { @@ -1006,6 +1008,10 @@ function delete_plugins( $plugins, $deprecated = '' ) { $plugin_slug = dirname( $plugin_file ); + if ( 'hello.php' === $plugin_file ) { + $plugin_slug = 'hello-dolly'; + } + // Remove language files, silently. if ( '.' !== $plugin_slug && ! empty( $plugin_translations[ $plugin_slug ] ) ) { $translations = $plugin_translations[ $plugin_slug ]; diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index 138780dc5a..2d925afa63 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -841,8 +841,6 @@ $_old_files = array( 'wp-includes/js/dist/undo-manager.min.js', 'wp-includes/js/dist/fields.min.js', 'wp-includes/js/dist/fields.js', - // 6.9 - 'wp-content/plugins/hello.php', ); /** @@ -975,7 +973,6 @@ $_new_bundled_files = array( 'themes/twentytwentythree/' => '6.1', 'themes/twentytwentyfour/' => '6.4', 'themes/twentytwentyfive/' => '6.7', - 'plugins/hello-dolly/' => '6.9', ); /** diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index 551d1016b4..c8235c314f 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -886,10 +886,6 @@ function upgrade_all() { upgrade_682(); } - if ( $wp_current_db_version < 60717 ) { - upgrade_690(); - } - maybe_disable_link_manager(); maybe_disable_automattic_widgets(); @@ -2485,31 +2481,6 @@ function upgrade_682() { } } -/** - * Executes changes made in WordPress 6.9.0. - * - * @ignore - * @since 6.9.0 - * - * @global int $wp_current_db_version The old (current) database version. - */ -function upgrade_690() { - global $wp_current_db_version; - - if ( $wp_current_db_version < 60717 ) { - // Switch Hello Dolly from file to directory format. See #53323 - $active_plugins = (array) get_option( 'active_plugins', array() ); - $old_plugin = 'hello.php'; - $new_plugin = 'hello-dolly/hello.php'; - $key = array_search( $old_plugin, $active_plugins, true ); - - if ( $key ) { - $active_plugins[ $key ] = $new_plugin; - update_option( 'active_plugins', $active_plugins ); - } - } -} - /** * Executes network-level upgrade routines. * diff --git a/wp-content/plugins/hello-dolly/hello.php b/wp-content/plugins/hello.php similarity index 100% rename from wp-content/plugins/hello-dolly/hello.php rename to wp-content/plugins/hello.php diff --git a/wp-includes/class-wp-plugin-dependencies.php b/wp-includes/class-wp-plugin-dependencies.php index ee5e999903..e4dc4b0f40 100644 --- a/wp-includes/class-wp-plugin-dependencies.php +++ b/wp-includes/class-wp-plugin-dependencies.php @@ -870,6 +870,9 @@ class WP_Plugin_Dependencies { * @return string The plugin's slug. */ protected static function convert_to_slug( $plugin_file ) { + if ( 'hello.php' === $plugin_file ) { + return 'hello-dolly'; + } return str_contains( $plugin_file, '/' ) ? dirname( $plugin_file ) : str_replace( '.php', '', $plugin_file ); } } diff --git a/wp-includes/version.php b/wp-includes/version.php index 62ff0b9a3a..c9050d1bd6 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-61005'; +$wp_version = '6.9-alpha-61006'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.