=== Maybe Perma Delete ===
Contributors: featurenotabug
Tags: delete, trash, permanent, force, esc
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Hold the Esc key to get the option to permanently delete posts, pages, and other content, instead of moving them to the trash first.

== Description ==

It can be quite annoying when you want to delete a post but it only has a Trash link. You then need to go into the trash to delete it for real. This plugin allows you to delete a post permanently by turning the trash links into a permanent delete link when you hold down the Esc key on your keyboard.

**Maybe Perma Delete** adds a convenient way to permanently delete content directly from the admin without the risk of pressing it accidentally:

- **Esc-hover in post tables**: Hold the Esc key while hovering over the Trash action in post, page, or custom post type lists. The link will change to **Delete permanently** for that specific row.
- **Esc-hover on the post edit screen**: On the single post edit screen, hold Esc while hovering over the **Move to Trash** link to turn it into **Delete permanently**.
- **Bulk actions**: The bulk actions dropdowns always include a **Delete permanently** option alongside the default Trash action.

== Installation ==

1. Upload the `maybe-perma-delete` folder to the `/wp-content/plugins/` directory, or install the plugin via the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Go to any posts, pages, or custom post type list, or open a single post edit screen, and use the Esc key with the delete actions as described.

== Frequently Asked Questions ==

= Does this replace the default trash behavior? =

No. The default **Move to Trash** behavior remains available everywhere. Maybe Perma Delete only adds an additional way to permanently delete items when you explicitly choose it.

= Does this work with custom post types? =

Yes, the plugin hooks into the standard admin post list and edit screens, so any custom post type that appears there will inherit the same behavior.

= Can I recover items that I permanently delete? =

No. When you use **Delete permanently**, the content is hard-deleted from the database. Make sure you have backups if you need the ability to restore deleted content.

= Does this work with media / the media library? =

Yes, but it only makes sense when media trash is manually enabled in your WordPress configuration. By default, media files are permanently deleted already. To enable trash for media, add the following to your `wp-config.php`:

`define( 'MEDIA_TRASH', true );`

Once enabled, media files will have a Trash action, and Maybe Perma Delete will work with them just like posts and pages.

= Does this affect front-end behavior? =

No. The plugin only modifies admin-side delete options and JavaScript. It doesn’t change your front-end or theme output.

== Changelog ==

= 1.0.0 =
Initial release:
* Esc-hover delete behavior in post tables for posts, pages, media, comments and all relevant custom post types.
* Esc-hover delete behavior on the post edit screen for both the classic editor and Gutenberg.
* Bulk **Delete permanently** actions alongside default trash actions.
