Plugins: Make delete plugin message less scary.

This adds a check if the plugin actually has an uninstall routine before saying that its data will be deleted too.

Props samful, joostdevalk, joyously, Chouby, SergeyBiryukov.
Fixes #50346.

git-svn-id: https://develop.svn.wordpress.org/trunk@48451 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-07-12 13:20:58 +00:00
parent cece47bd39
commit 26c296c397
2 changed files with 14 additions and 0 deletions

View File

@@ -942,6 +942,10 @@ class WP_Plugins_List_Table extends WP_List_Table {
$class .= ' paused';
}
if ( is_uninstallable_plugin( $plugin_file ) ) {
$class .= ' is-uninstallable';
}
printf(
'<tr class="%s" data-slug="%s" data-plugin="%s">',
esc_attr( $class ),