Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exclude attachments from getting deleted using the Bulk Delete Attachments add-on for Bulk Delete plugin
<?php
add_filter( 'bd_delete_attachment_excluded_attachment_ids', 'prefix_exclude_attachment_ids_from_deletion' );
function prefix_exclude_attachment_ids_from_deletion( $attachment_ids ) {
return array(
100,
111,
112,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.