diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index de1468352b..b1167b2e4c 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -153,8 +153,6 @@ 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 ) { @@ -1008,10 +1006,6 @@ 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 2d925afa63..138780dc5a 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -841,6 +841,8 @@ $_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', ); /** @@ -973,6 +975,7 @@ $_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 95f090af9f..a91b614d3e 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -880,6 +880,7 @@ function upgrade_all() { if ( $wp_current_db_version < 58975 ) { upgrade_670(); + upgrade_690(); } if ( $wp_current_db_version < 60421 ) { @@ -2414,6 +2415,29 @@ function upgrade_650() { wp_set_option_autoload_values( $autoload ); } } + +/** + * 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; + + // Switch Hello Dolly from file to directory format. See #53323 + $active_plugins = get_option( 'active_plugins' ); + $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 changes made in WordPress 6.7.0. * diff --git a/wp-content/plugins/hello.php b/wp-content/plugins/hello.php deleted file mode 100644 index e10ecb3b24..0000000000 --- a/wp-content/plugins/hello.php +++ /dev/null @@ -1,105 +0,0 @@ -Hello, Dolly in the upper right of your admin screen on every page. -Author: Matt Mullenweg -Version: 1.7.2 -Author URI: http://ma.tt/ -*/ - -// Do not load directly. -if ( ! defined( 'ABSPATH' ) ) { - die(); -} - -function hello_dolly_get_lyric() { - /** These are the lyrics to Hello Dolly */ - $lyrics = "Hello, Dolly -Well, hello, Dolly -It's so nice to have you back where you belong -You're lookin' swell, Dolly -I can tell, Dolly -You're still glowin', you're still crowin' -You're still goin' strong -I feel the room swayin' -While the band's playin' -One of our old favorite songs from way back when -So, take her wrap, fellas -Dolly, never go away again -Hello, Dolly -Well, hello, Dolly -It's so nice to have you back where you belong -You're lookin' swell, Dolly -I can tell, Dolly -You're still glowin', you're still crowin' -You're still goin' strong -I feel the room swayin' -While the band's playin' -One of our old favorite songs from way back when -So, golly, gee, fellas -Have a little faith in me, fellas -Dolly, never go away -Promise, you'll never go away -Dolly'll never go away again"; - - // Here we split it into lines. - $lyrics = explode( "\n", $lyrics ); - - // And then randomly choose a line. - return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] ); -} - -// This just echoes the chosen line, we'll position it later. -function hello_dolly() { - $chosen = hello_dolly_get_lyric(); - $lang = ''; - if ( 'en_' !== substr( get_user_locale(), 0, 3 ) ) { - $lang = ' lang="en"'; - } - - printf( - '

%s %s

', - __( 'Quote from Hello Dolly song, by Jerry Herman:' ), - $lang, - $chosen - ); -} - -// Now we set that function up to execute when the admin_notices action is called. -add_action( 'admin_notices', 'hello_dolly' ); - -// We need some CSS to position the paragraph. -function dolly_css() { - echo " - - "; -} - -add_action( 'admin_head', 'dolly_css' ); diff --git a/wp-includes/class-wp-plugin-dependencies.php b/wp-includes/class-wp-plugin-dependencies.php index e4dc4b0f40..ee5e999903 100644 --- a/wp-includes/class-wp-plugin-dependencies.php +++ b/wp-includes/class-wp-plugin-dependencies.php @@ -870,9 +870,6 @@ 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 332a838908..324cf59953 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60665'; +$wp_version = '6.9-alpha-60666'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.