WP_REST_Plugins_Controller
class WP_REST_Plugins_Controller
// Constructor: function Object() { [native code] } Core class to access plugins via the REST API.
Methods 26 methods
| Method / Return | Description |
|---|---|
| __construct() void | Plugins controller constructor. |
| register_routes() void | Registers the routes for the plugins controller. |
| get_items_permissions_check() (true | Checks if a given request has access to get plugins.
Parameters: $request: mixed |
| get_items() (WP_REST_Response | Retrieves a collection of plugins.
Parameters: $request: mixed |
| get_item_permissions_check() (true | Checks if a given request has access to get a specific plugin.
Parameters: $request: mixed |
| get_item() (WP_REST_Response | Retrieves one plugin from the site.
Parameters: $request: mixed |
| check_read_permission() (true | Checks if the given plugin can be viewed by the current user.
Parameters: $plugin: mixed |
| create_item_permissions_check() (true | Checks if a given request has access to upload plugins.
Parameters: $request: mixed |
| create_item() (WP_REST_Response | Uploads a plugin and optionally activates it.
Parameters: $request: mixed |
| update_item_permissions_check() (true | Checks if a given request has access to update a specific plugin.
Parameters: $request: mixed |
| update_item() (WP_REST_Response | Updates one plugin.
Parameters: $request: mixed |
| delete_item_permissions_check() (true | Checks if a given request has access to delete a specific plugin.
Parameters: $request: mixed |
| delete_item() (WP_REST_Response | Deletes one plugin from the site.
Parameters: $request: mixed |
| prepare_item_for_response() (WP_REST_Response | Prepares the plugin for the REST response.
Parameters: $item: mixed, $request: mixed |
| prepare_links() array[] | Prepares links for the request.
Parameters: $item: mixed |
| get_plugin_data() (array | Gets the plugin header data for a plugin.
Parameters: $plugin: mixed |
| get_plugin_status() string | Get's the activation status for a plugin.
Parameters: $plugin: mixed |
| plugin_status_permission_check() (true | Handle updating a plugin's status.
Parameters: $plugin: mixed, $new_status: mixed, $current_status: mixed |
| handle_plugin_status() (true | Handle updating a plugin's status.
Parameters: $plugin: mixed, $new_status: mixed, $current_status: mixed |
| validate_plugin_param() bool | Checks that the "plugin" parameter is a valid path.
Parameters: $file: mixed |
| sanitize_plugin_param() string | Sanitizes the "plugin" parameter to be a proper plugin file with ".php" appended.
Parameters: $file: mixed |
| does_plugin_match_request() bool | Checks if the plugin matches the requested parameters.
Parameters: $request: mixed, $item: mixed |
| is_plugin_installed() bool | Checks if the plugin is installed.
Parameters: $plugin: mixed |
| is_filesystem_available() (true | Determine if the endpoints are available. |
| get_item_schema() array | Retrieves the plugin's schema, conforming to JSON Schema. |
| get_collection_params() array | Retrieves the query params for the collections. |