mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-13 21:30:26 +00:00
Docs: Improve documentation for WP_REST_Attachments_Controller.
This adds a missing DocBlock for `::register_routes()` and parameter descriptions for `::post_process_item()`. Includes minor documenation fixes in other REST API classes for consistency. Props dkarfa, mukesh27, SergeyBiryukov. Fixes #48841. git-svn-id: https://develop.svn.wordpress.org/trunk@47391 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -16,6 +16,13 @@
|
||||
*/
|
||||
class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||
|
||||
/**
|
||||
* Registers the routes for attachments.
|
||||
*
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @see register_rest_route()
|
||||
*/
|
||||
public function register_routes() {
|
||||
parent::register_routes();
|
||||
register_rest_route(
|
||||
@@ -344,8 +351,8 @@ class WP_REST_Attachments_Controller extends WP_REST_Posts_Controller {
|
||||
*
|
||||
* @since 5.3.0
|
||||
*
|
||||
* @param WP_REST_Request $request
|
||||
* @return WP_REST_Response|WP_Error
|
||||
* @param WP_REST_Request $request Full details about the request.
|
||||
* @return WP_REST_Response|WP_Error Response object on success, WP_Error object on failure.
|
||||
*/
|
||||
public function post_process_item( $request ) {
|
||||
switch ( $request['action'] ) {
|
||||
|
||||
Reference in New Issue
Block a user