-
Notifications
You must be signed in to change notification settings - Fork 658
Hook Docs for lib/endpoints/class-wp-rest-users-controller.php #1556
Hook Docs for lib/endpoints/class-wp-rest-users-controller.php #1556
Conversation
* Add some missing filter docs * Spacing, punctuation cleanup as per standard * Change second action from `rest_insert_user` to `rest_update_user` as its in the update function * added some todo notes, I don’t understand what the final false variable is for, maybe its needed?
* @param WP_REST_Request $request Request object. | ||
* @param bool $bool A boolean that is false. | ||
* @param bool $bool A boolean that is false. | ||
* @todo remove final bool = false variable, unused? | ||
*/ | ||
do_action( 'rest_insert_user', $user, $request, false ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamsilverstein The third param here should be true
on "Create" (it should be false on update).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifying, I will add that info to the docblock
Note: I believe this also corrects an issue with the first call of the Please confirm this is correct before merging :) |
Working on lib/endpoints/class-wp-rest-terms-controller.php now and wondering why I don't see similar do_action( 'rest_insert_term' ...) hooks firing. Is this intentional, or an oversight? If the latter I can go ahead and add them as I go :) |
@adamsilverstein Just an oversight. |
@@ -2,3 +2,5 @@ | |||
composer.lock | |||
node_modules | |||
vendor | |||
|
|||
.idea/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamsilverstein can you undo this change to the .gitignore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh, should be in my local exclude sorry. kind of switching back to sublime anyway :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed.
@rachelbaker This should be good to go unless I missed some feedback, I'm addressing adding missing hooks in #1571 |
…t-users-controller-php Hook Docs for lib/endpoints/class-wp-rest-users-controller.php
✨ |
See #1549.
rest_insert_user
torest_update_user
asits in the update function
variable is for, maybe its needed?