diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js index 0743ac3780..c243611eb6 100644 --- a/src/js/_enqueues/wp/updates.js +++ b/src/js/_enqueues/wp/updates.js @@ -2138,11 +2138,21 @@ */ $bulkActionForm.on( 'click', '[data-plugin] a.delete', function( event ) { var $pluginRow = $( event.target ).parents( 'tr' ), + confirmMessage; + + if ( $pluginRow.hasClass( 'is-uninstallable' ) ) { confirmMessage = sprintf( /* translators: %s: Plugin name. */ __( 'Are you sure you want to delete %s and its data?' ), $pluginRow.find( '.plugin-title strong' ).text() ); + } else { + confirmMessage = sprintf( + /* translators: %s: Plugin name. */ + __( 'Are you sure you want to delete %s?' ), + $pluginRow.find( '.plugin-title strong' ).text() + ); + } event.preventDefault(); diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php index 9e5881976c..56bc665b66 100644 --- a/src/wp-admin/includes/class-wp-plugins-list-table.php +++ b/src/wp-admin/includes/class-wp-plugins-list-table.php @@ -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( '