Created
November 17, 2018 05:37
-
-
Save sudar/a376471251db429cde2167e3581afd36 to your computer and use it in GitHub Desktop.
Exclude attachments from getting deleted using the Bulk Delete Attachments add-on for Bulk Delete plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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