Uses
Uses | Description |
---|---|
wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php: WP_REST_Plugins_Controller::get_plugin_status() | Get’s the activation status for a plugin. |
Checks if the plugin matches the requested parameters.
(WP_REST_Request) (Required) The request to require the plugin matches against.
(array) (Required) The plugin item.
(bool)
File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
protected function does_plugin_match_request( $request, $item ) { $search = $request['search']; if ( $search ) { $matched_search = false; foreach ( $item as $field ) { if ( is_string( $field ) && false !== strpos( strip_tags( $field ), $search ) ) { $matched_search = true; break; } } if ( ! $matched_search ) { return false; } } $status = $request['status']; if ( $status && ! in_array( $this->get_plugin_status( $item['_file'] ), $status, true ) ) { return false; } return true; }
Version | Description |
---|---|
5.5.0 | Introduced. |
© 2003–2019 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/does_plugin_match_request