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.


Top ↑

Source

File: wp-admin/includes/user.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
3.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.