Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

WP_REST_Request:get_params()/get_param() returns route... #1621

@Shelob9

Description

@Shelob9

Not sure if this was intended, but it's annoying me. In my callback, where $request is WP_REST_Request object and I do this:

$params = $request->get_params();
$zero = $request->get_param( 0 );

I get a 0 index in $params and $zero has the route URL. I don't see why it should be a param, it's not registered on the endpoint, and its redundant to what I can get with the get_url_params() method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions