Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#34416 closed defect (bug) (fixed)

Require the $namespace argument in register_rest_route()

Reported by: danielbachhuber Owned by: rmccue
Priority: normal Milestone: 4.4
Component: REST API Version:
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

Per discussion on Slack, we should return true on success, and add a _doing_it_wrong() and return false if the $namespace parameter is empty.

Originally https://github.com/WP-API/WP-API/issues/1505

Attachments (2)

34416.1.diff (3.4 KB ) - added by danielbachhuber 11 years ago.
34416.2.diff (3.4 KB ) - added by danielbachhuber 11 years ago.

Download all attachments as: .zip

Change History (9)

#1 @swissspidy
11 years ago

Is the WPAPI-2.0 version intentional? Does it make sense to change that to 4.4? See also #34249

This ticket was mentioned in Slack in #core-restapi by danielbachhuber. View the logs.


11 years ago

#3 @danielbachhuber
11 years ago

  • Keywords commit added

34416.2.diff refreshes the patch and changes the version to 4.4.0

#4 @rmccue
11 years ago

  • Owner set to rmccue
  • Status newassigned

This ticket was mentioned in Slack in #core by danielbachhuber. View the logs.


11 years ago

This ticket was mentioned in Slack in #core-restapi by rmccue. View the logs.


11 years ago

#7 @rmccue
11 years ago

  • Resolutionfixed
  • Status assignedclosed

In 35651:

REST API: Require namespace when registering routes.

Props danielbachhuber.
Fixes #34416.

Note: See TracTickets for help on using tickets.