Plugins: Make sure Hello Dolly translations are deleted when the plugin is deleted.

Follow-up to [19965], [29856].

Props costdev, Otshelnik-Fm, JeffPaul, SergeyBiryukov.
Fixes #52817.
Built from https://develop.svn.wordpress.org/trunk@51064


git-svn-id: http://core.svn.wordpress.org/trunk@50673 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-06-02 15:12:58 +00:00
parent fde119d446
commit 8e5b3d5a97
2 changed files with 7 additions and 2 deletions

View File

@ -999,8 +999,13 @@ function delete_plugins( $plugins, $deprecated = '' ) {
continue;
}
// Remove language files, silently.
$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 ];

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.8-alpha-51063';
$wp_version = '5.8-alpha-51064';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.