wp_lib_bypass_deletion_checks - roberts-sandbox/create-repo GitHub Wiki

###Description

This filter is applied to a boolean that decides whether an Item, Member, Loan or Fine should be allowed to be deleted regardless of integrity checks. This can be used to override WP-Librarian's integrity checking, which ensures library objects aren't deleted if there are other objects dependant on them (fines dependant on their parent loans).

Note: DO NOT use this as a quick fix for getting around pre-deletion integrity checking. Those checks exist to keep the library intact and misuse of this filter will corrupt your library.

###Context

This filter is called from the WordPress action hook [before_delete_post](https://codex.wordpress.org/Plugin_API/Action_Reference/before_delete_post) on all library objects, provided the conditions evaluated first don't come True (because PHP's logical operators short-circuit).

###Parameters

$skip_checks
Whether or not to skip integrity checking. False by default, by other plugins using this filter may alter this value.

$post_id
The WP Post ID of the current library object being checked pre-deletion

⚠️ **GitHub.com Fallback** ⚠️