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` - <del>`$plural_label`</del> - <del>`$singular_label`</del> Edit: As it turns out, we can't use variables in the labels :( Related #2056 We'll need to update: - [x] `WP_REST_Attachments_Controller` - [x] `WP_REST_Comments_Controller` - [x] `WP_REST_Meta_Controller` - [x] `WP_REST_Post_Statuses_Controller` - [x] `WP_REST_Post_Types_Controller` - [x] `WP_REST_Posts_Controller` - [x] `WP_REST_Revisions_Controller` - [x] `WP_REST_Taxonomies_Controller` - [x] `WP_REST_Terms_Controller` - [x] `WP_REST_Users_Controller`
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_labelEdit: As it turns out, we can't use variables in the labels :(
Related #2056
We'll need to update:
WP_REST_Attachments_ControllerWP_REST_Comments_ControllerWP_REST_Meta_ControllerWP_REST_Post_Statuses_ControllerWP_REST_Post_Types_ControllerWP_REST_Posts_ControllerWP_REST_Revisions_ControllerWP_REST_Taxonomies_ControllerWP_REST_Terms_ControllerWP_REST_Users_Controller