post_types_to_delete_with_user filter-hookWP 3.4.0

Filters the list of post types to delete with a user.

Usage

add_filter( 'post_types_to_delete_with_user', 'wp_kama_post_types_to_delete_with_user_filter', 10, 2 );

/**
 * Function for `post_types_to_delete_with_user` filter-hook.
 * 
 * @param string[] $post_types_to_delete Array of post types to delete.
 * @param int      $id                   User ID.
 *
 * @return string[]
 */
function wp_kama_post_types_to_delete_with_user_filter( $post_types_to_delete, $id ){

	// filter...
	return $post_types_to_delete;
}
$post_types_to_delete(string[])
Array of post types to delete.
$id(int)
User ID.

Changelog

Since 3.4.0 Introduced.

Where the hook is called

wp_delete_user()
post_types_to_delete_with_user
wp-admin/includes/user.php 388
$post_types_to_delete = apply_filters( 'post_types_to_delete_with_user', $post_types_to_delete, $id );

Where the hook is used in WordPress

Usage not found.