Title: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Developer.WordPress.org

---

# File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php

 * method[WP_REST_Plugins_Controller::prepare_links()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_links/)
 * Prepares links for the request.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_links/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_links/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:630](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L630-L643)
 * method[WP_REST_Plugins_Controller::get_plugin_data()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_data/)
 * Gets the plugin header data for a plugin.
 * Used by [3 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_data/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_data/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:653](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L653-L664)
 * method[WP_REST_Plugins_Controller::get_plugin_status()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_status/)
 * Get’s the activation status for a plugin.
 * Used by [4 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_status/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_plugin_status/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:674](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L674-L684)
 * method[WP_REST_Plugins_Controller::plugin_status_permission_check()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/plugin_status_permission_check/)
 * Handle updating a plugin’s status.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/plugin_status_permission_check/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/plugin_status_permission_check/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:696](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L696-L722)
 * method[WP_REST_Plugins_Controller::handle_plugin_status()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/handle_plugin_status/)
 * Handle updating a plugin’s status.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/handle_plugin_status/#used-by)
   | Uses [7 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/handle_plugin_status/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:734](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L734-L764)
 * method[WP_REST_Plugins_Controller::validate_plugin_param()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/validate_plugin_param/)
 * Checks that the “plugin” parameter is a valid path.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/validate_plugin_param/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/validate_plugin_param/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:774](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L774-L782)
 * method[WP_REST_Plugins_Controller::sanitize_plugin_param()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/sanitize_plugin_param/)
 * Sanitizes the “plugin” parameter to be a proper plugin file with “.php” appended.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/sanitize_plugin_param/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/sanitize_plugin_param/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:792](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L792-L794)
 * method[WP_REST_Plugins_Controller::does_plugin_match_request()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/does_plugin_match_request/)
 * Checks if the plugin matches the requested parameters.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/does_plugin_match_request/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/does_plugin_match_request/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:805](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L805-L830)
 * method[WP_REST_Plugins_Controller::is_plugin_installed()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_plugin_installed/)
 * Checks if the plugin is installed.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_plugin_installed/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_plugin_installed/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:840](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L840-L842)
 * method[WP_REST_Plugins_Controller::is_filesystem_available()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_filesystem_available/)
 * Determine if the endpoints are available.
 * Used by [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_filesystem_available/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_filesystem_available/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:853](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L853-L869)
 * method[WP_REST_Plugins_Controller::get_item_schema()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item_schema/)
 * Retrieves the plugin’s schema, conforming to JSON Schema.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item_schema/#used-by)
   | Uses [2 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item_schema/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:878](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L878-L977)
 * method[WP_REST_Plugins_Controller::get_collection_params()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_collection_params/)
 * Retrieves the query params for the collections.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_collection_params/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_collection_params/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:986](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L986-L1003)
 * hook[rest_prepare_plugin](https://developer.wordpress.org/reference/hooks/rest_prepare_plugin/)
 * Filters plugin data for a REST API response.
 * Used by [1 function](https://developer.wordpress.org/reference/hooks/rest_prepare_plugin/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/hooks/rest_prepare_plugin/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:619](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L619-L619)
 * method[WP_REST_Plugins_Controller::get_items()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_items/)
 * Retrieves a collection of plugins.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_items/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_items/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:132](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L132-L152)
 * method[WP_REST_Plugins_Controller::get_item_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item_permissions_check/)
 * Checks if a given request has access to get a specific plugin.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item_permissions_check/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item_permissions_check/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:162](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L162-L178)
 * method[WP_REST_Plugins_Controller::get_item()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item/)
 * Retrieves one plugin from the site.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item/#used-by)
   | Uses [3 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_item/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:188](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L188-L198)
 * method[WP_REST_Plugins_Controller::check_read_permission()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/check_read_permission/)
 * Checks if the given plugin can be viewed by the current user.
 * Used by [4 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/check_read_permission/#used-by)
   | Uses [8 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/check_read_permission/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:211](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L211-L231)
 * method[WP_REST_Plugins_Controller::create_item_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/create_item_permissions_check/)
 * Checks if a given request has access to upload plugins.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/create_item_permissions_check/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/create_item_permissions_check/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:241](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L241-L261)
 * method[WP_REST_Plugins_Controller::create_item()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/create_item/)
 * Uploads a plugin and optionally activates it.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/create_item/#used-by)
   | Uses [13 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/create_item/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:273](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L273-L413)
 * method[WP_REST_Plugins_Controller::update_item_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/update_item_permissions_check/)
 * Checks if a given request has access to update a specific plugin.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/update_item_permissions_check/#used-by)
   | Uses [8 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/update_item_permissions_check/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:423](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L423-L451)
 * method[WP_REST_Plugins_Controller::update_item()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/update_item/)
 * Updates one plugin.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/update_item/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/update_item/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:461](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L461-L485)
 * method[WP_REST_Plugins_Controller::delete_item_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/delete_item_permissions_check/)
 * Checks if a given request has access to delete a specific plugin.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/delete_item_permissions_check/#used-by)
   | Uses [6 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/delete_item_permissions_check/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:495](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L495-L519)
 * method[WP_REST_Plugins_Controller::delete_item()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/delete_item/)
 * Deletes one plugin from the site.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/delete_item/#used-by)
   | Uses [8 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/delete_item/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:529](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L529-L567)
 * method[WP_REST_Plugins_Controller::prepare_item_for_response()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_item_for_response/)
 * Prepares the plugin for the REST response.
 * Used by [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_item_for_response/#used-by)
   | Uses [5 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/prepare_item_for_response/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:578](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L578-L620)
 * class[WP_REST_Plugins_Controller](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/)
 * Core class to access plugins via the REST API.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/#used-by)
   | Uses [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:17](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L17-L1004)
 * method[WP_REST_Plugins_Controller::__construct()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/__construct/)
 * Plugins controller constructor.
 * Used by [1 function](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/__construct/#used-by)
   | Uses [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/__construct/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:26](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L26-L29)
 * method[WP_REST_Plugins_Controller::register_routes()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/register_routes/)
 * Registers the routes for the plugins controller.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/register_routes/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/register_routes/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:36](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L36-L102)
 * method[WP_REST_Plugins_Controller::get_items_permissions_check()](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_items_permissions_check/)
 * Checks if a given request has access to get plugins.
 * Used by [0 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_items_permissions_check/#used-by)
   | Uses [4 functions](https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/get_items_permissions_check/#uses)
   | Source: [wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php:112](https://github.com/WordPress/wordpress-develop/blob/7.1/src/wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php#L112-L122)