Parsed: 123753

<?php

/**
 * REST API: WP_REST_Attachments_Controller class
 *
 * @package WordPress
 * @subpackage REST_API
 * @since 4.7.0
 */

/* class WP_REST_Attachments_Controller */
/* function WP_REST_Attachments_Controller::register_routes() – Registers the routes for attachments. */
/* function WP_REST_Attachments_Controller::prepare_items_query() – Determines the allowed query_vars for a get_items() response and
prepares for WP_Query. */
/* function WP_REST_Attachments_Controller::create_item_permissions_check() – Checks if a given request has access to create an attachment. */
/* function WP_REST_Attachments_Controller::create_item() – Creates a single attachment. */
/* function WP_REST_Attachments_Controller::insert_attachment() – Inserts the attachment post in the database. Does not update the attachment meta. */
/* function WP_REST_Attachments_Controller::update_item() – Updates a single attachment. */
/* function WP_REST_Attachments_Controller::post_process_item() – Performs post processing on an attachment. */
/* function WP_REST_Attachments_Controller::post_process_item_permissions_check() – Checks if a given request can perform post processing on an attachment. */
/* function WP_REST_Attachments_Controller::edit_media_item_permissions_check() – Checks if a given request has access to editing media. */
/* function WP_REST_Attachments_Controller::edit_media_item() – Applies edits to a media item and creates a new attachment record. */
/* function WP_REST_Attachments_Controller::prepare_item_for_database() – Prepares a single attachment for create or update. */
/* function WP_REST_Attachments_Controller::prepare_item_for_response() – Prepares a single attachment output for response. */
/* function WP_REST_Attachments_Controller::get_item_schema() – Retrieves the attachment’s schema, conforming to JSON Schema. */
/* function WP_REST_Attachments_Controller::upload_from_data() – Handles an upload via raw POST data. */
/* function WP_REST_Attachments_Controller::get_filename_from_disposition() – Parses filename from a Content-Disposition header value. */
/* function WP_REST_Attachments_Controller::get_collection_params() – Retrieves the query params for collections of attachments. */
/* function WP_REST_Attachments_Controller::upload_from_file() – Handles an upload via multipart/form-data ($_FILES). */
/* function WP_REST_Attachments_Controller::get_media_types() – Retrieves the supported media types. */
/* function WP_REST_Attachments_Controller::check_upload_size() – Determine if uploaded file exceeds space quota on multisite. */
/* function WP_REST_Attachments_Controller::get_edit_media_item_args() – Gets the request args for the edit item route. */