Docs: All sorts of improvements and corrections to function and hook docs.

See #57840


git-svn-id: https://develop.svn.wordpress.org/trunk@55694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn
2023-04-27 23:13:36 +00:00
parent 65d27e4485
commit 991fa6bff2
12 changed files with 79 additions and 61 deletions
+17 -7
View File
@@ -324,18 +324,21 @@ function get_users_drafts( $user_id ) {
}
/**
* Remove user and optionally reassign posts and links to another user.
* Delete user and optionally reassign posts and links to another user.
*
* If the $reassign parameter is not assigned to a User ID, then all posts will
* be deleted of that user. The action {@see 'delete_user'} that is passed the User ID
* Note that on a Multisite installation the user only gets removed from the site
* and does not get deleted from the database.
*
* If the `$reassign` parameter is not assigned to a user ID, then all posts will
* be deleted of that user. The action {@see 'delete_user'} that is passed the user ID
* being deleted will be run after the posts are either reassigned or deleted.
* The user meta will also be deleted that are for that User ID.
* The user meta will also be deleted that are for that user ID.
*
* @since 2.0.0
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param int $id User ID.
* @param int $id User ID.
* @param int $reassign Optional. Reassign posts and links to new User ID.
* @return bool True when finished.
*/
@@ -361,7 +364,10 @@ function wp_delete_user( $id, $reassign = null ) {
}
/**
* Fires immediately before a user is deleted from the database.
* Fires immediately before a user is deleted from the site.
*
* Note that on a Multisite installation the user only gets removed from the site
* and does not get deleted from the database.
*
* @since 2.0.0
* @since 5.5.0 Added the `$user` parameter.
@@ -440,7 +446,11 @@ function wp_delete_user( $id, $reassign = null ) {
clean_user_cache( $user );
/**
* Fires immediately after a user is deleted from the database.
* Fires immediately after a user is deleted from the site.
*
* Note that on a Multisite installation the user may not have been deleted from
* the database depending on whether `wp_delete_user()` or `wpmu_delete_user()`
* was called.
*
* @since 2.9.0
* @since 5.5.0 Added the `$user` parameter.