镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
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