Opened 12 years ago
Closed 12 years ago
#26099 closed defect (bug) (fixed)
Hook Docs: wp-admin/includes/user.php
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.8 | Priority: | normal |
| Severity: | normal | Version: | |
| Component: | Inline Docs | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Attached patch has docs for the editable_roles, get_users_drafts, and post_types_to_delete_with_user filters in wp-admin/includes/user.php.
Attachments (3)
Change History (9)
#1
@
12 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from Awaiting Review to 3.8
- Owner set to DrewAPicture
- Status changed from new to reviewing
#2
@
12 years ago
Also, I just realized you didn't document any of the action hooks in this file. Looks like you missed:
check_passwordsuser_profile_update_errorsdelete_userdeleted_user(duplicate, documented in wp-admin/includes/ms.php)
#3
@
12 years ago
- Keywords has-patch added; needs-patch removed
26099.2.patch applies the suggested changes in comment:1 and adds docs for the actions mentioned in comment:2.
#4
@
12 years ago
- Keywords needs-patch added; has-patch removed
@DrewAPicture: Thanks for the updated patch (26099.2.patch).
Just a few changes needed:
check_passwords:
- @since should be 1.5.1
editable_roles:
- Variable in @param line should be $all_roles.
delete_user:
- This is not a duplicate hook.
- @since is 2.0.0
- Space out the action line please.
deleted_user:
- Should be:
/** This action is documented in wp-admin/includes/ms.php */ - Space out the action line please.
Could you make these changes and submit a new patch please? :)
#5
@
12 years ago
- Keywords has-patch commit added; needs-patch removed
26099.3.patch incorporates the suggested changes in comment:4, except for the changes on the deleted_user action.
After looking into it a little more, a switcheroo was in order. The hook was originally added to wp-admin/includes/user.php in 2.9, see [10894], and later also added to wp-admin/includes/ms.php in 3.0, see [12766].
Hi Aaron, thanks for the patch. Just a couple changes to make and we'll call this good:
editable_rolesfilter:$wp_roles->rolesproperty is an array, therefore$all_rolesshould be of the type arrayapply_filtersline per coding standardsget_users_draftsfilter:$queryparameter and the purpose of this filter is to literally filter the query string, e.g.SELECT ID, post_title FROM wp_posts WHERE post_type = .... The filter and parameter descriptions should reflect that.apply_filtersline per coding standardspost_types_to_delete_with_userfilter$post_types_to_delete, is an array, not a string$id, is missing from the doc block