post_types_to_delete_with_user WordPress Filter Hook
The post_types_to_delete_with_user hook is used to specify which post types should be deleted when a user is deleted. This can be useful if you want to keep certain post types associated with a user, even if they are deleted.
apply_filters( 'post_types_to_delete_with_user', string[] $post_types_to_delete , int $id ) #
Filters the list of post types to delete with a user.
Parameters
- $post_types_to_delete
(string[])Array of post types to delete.
- $id
(int)User ID.
Source
Changelog
Version | Description |
---|---|
3.4.0 | Introduced. |