WP Manifestindependent plugin directory
manifest / media / wpu_attachments_enhanced

WPU Attachments Enhanced

Add enhancements to attachments in WordPress

by Darklg · github.com/wordpressutilities/wpu_attachments_enhanced · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/wordpressutilities/wpu_attachments_enhanced/archive/refs/heads/main.zip

Add enhancements to attachments in WordPress

Features

Disable deletion

Adds a "Protected against deletion" checkbox on attachments (edit page and media modal).

  • While checked, nobody can delete the attachment from the back-office, administrators included : uncheck it first.
  • Only users with the minimum capability can toggle it. Others see a read-only notice.
  • A lock icon flags protected attachments in the media library (list and grid modes).

Change the minimum capability required to toggle the protection (default : manage_options) :

add_filter('wpu_attachments_enhanced__protected_min_cap', function ($cap) {
    return 'edit_others_posts';
});