Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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.

Introduce new WP_REST_Controller protected class variables #2118

Copy link
Copy link

Description

@danielbachhuber
Issue body actions

To make it easier to subclass WP_REST_Controller's children and reuse their methods, I propose we introduce four protected class variables:

  • $namespace
  • $rest_base
  • $plural_label
  • $singular_label

Edit: As it turns out, we can't use variables in the labels :(

Related #2056

We'll need to update:

  • WP_REST_Attachments_Controller
  • WP_REST_Comments_Controller
  • WP_REST_Meta_Controller
  • WP_REST_Post_Statuses_Controller
  • WP_REST_Post_Types_Controller
  • WP_REST_Posts_Controller
  • WP_REST_Revisions_Controller
  • WP_REST_Taxonomies_Controller
  • WP_REST_Terms_Controller
  • WP_REST_Users_Controller
Reactions are currently unavailable

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.