Skip to content

Commit e37b85f

Browse files
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. git-svn-id: https://develop.svn.wordpress.org/trunk@51064 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 39043f8 commit e37b85f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/wp-admin/includes/plugin.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,8 +999,13 @@ function delete_plugins( $plugins, $deprecated = '' ) {
999999
continue;
10001000
}
10011001

1002-
// Remove language files, silently.
10031002
$plugin_slug = dirname( $plugin_file );
1003+
1004+
if ( 'hello.php' === $plugin_file ) {
1005+
$plugin_slug = 'hello-dolly';
1006+
}
1007+
1008+
// Remove language files, silently.
10041009
if ( '.' !== $plugin_slug && ! empty( $plugin_translations[ $plugin_slug ] ) ) {
10051010
$translations = $plugin_translations[ $plugin_slug ];
10061011

0 commit comments

Comments
 (0)