Skip to content

Update routes-and-endpoints.md #204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion extending-the-rest-api/routes-and-endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function prefix_register_example_routes() {
'methods' => WP_REST_Server::READABLE,
// Here we register our callback. The callback is fired when this endpoint is matched by the WP_REST_Server class.
'callback' => 'prefix_get_colors',
// Here we register our permissions callback. The callback is fired before the main callback to check if the current user can access the endpoint.
// Here we specify an arguments method to run in conjunction with the endpoint registration. The method dictates what extra parameters can be attached to the endpoint in order to change the response.
'args' => prefix_get_color_arguments(),
) );
}
Expand Down