diff --git src/js/_enqueues/wp/updates.js src/js/_enqueues/wp/updates.js
index ff8cb07..9605d7b 100644
|
|
|
2137 | 2137 | * @param {Event} event Event interface. |
2138 | 2138 | */ |
2139 | 2139 | $bulkActionForm.on( 'click', '[data-plugin] a.delete', function( event ) { |
2140 | | var $pluginRow = $( event.target ).parents( 'tr' ), |
2141 | | confirmMessage = sprintf( |
| 2140 | var $pluginRow = $( event.target ).parents( 'tr' ); |
| 2141 | |
| 2142 | if($(event.target).hasClass('no-plugin-data')){ |
| 2143 | var confirmMessage = sprintf( |
| 2144 | /* translators: %s: Plugin name. */ |
| 2145 | __( 'Are you sure you want to delete %s?' ), |
| 2146 | $pluginRow.find( '.plugin-title strong' ).text() |
| 2147 | ); |
| 2148 | } else { |
| 2149 | var confirmMessage = sprintf( |
2142 | 2150 | /* translators: %s: Plugin name. */ |
2143 | 2151 | __( 'Are you sure you want to delete %s and its data?' ), |
2144 | 2152 | $pluginRow.find( '.plugin-title strong' ).text() |
2145 | 2153 | ); |
| 2154 | } |
2146 | 2155 | |
2147 | 2156 | event.preventDefault(); |
2148 | 2157 | |
diff --git src/wp-admin/includes/class-wp-plugins-list-table.php src/wp-admin/includes/class-wp-plugins-list-table.php
index d3233b4..fb41301 100644
|
|
class WP_Plugins_List_Table extends WP_List_Table { |
757 | 757 | } |
758 | 758 | |
759 | 759 | if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { |
| 760 | |
| 761 | $has_plugin_data = is_uninstallable_plugin($plugin_file) ? "has-plugin-data" : "no-plugin-data"; |
| 762 | |
760 | 763 | $actions['delete'] = sprintf( |
761 | | '<a href="%s" id="delete-%s" class="delete" aria-label="%s">%s</a>', |
| 764 | '<a href="%s" id="delete-%s" class="delete%s" aria-label="%s">%s</a>', |
762 | 765 | wp_nonce_url( 'plugins.php?action=delete-selected&checked[]=' . urlencode( $plugin_file ) . '&plugin_status=' . $context . '&paged=' . $page . '&s=' . $s, 'bulk-plugins' ), |
763 | 766 | esc_attr( $plugin_slug ), |
| 767 | " $has_plugin_data", |
764 | 768 | /* translators: %s: Plugin name. */ |
765 | 769 | esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ), |
766 | 770 | __( 'Delete' ) |