On this page
WP_REST_Plugins_Controller::is_plugin_installed( string $plugin ): bool
Checks if the plugin is installed.
Parameters
$pluginstring Required-
The plugin file.
Return
bool
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php. View all references
protected function is_plugin_installed( $plugin ) {
return file_exists( WP_PLUGIN_DIR . '/' . $plugin );
}
Related
Used By
| Used By | Description |
|---|---|
| WP_REST_Plugins_Controller::check_read_permission() wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php | Checks if the given plugin can be viewed by the current user. |
Changelog
| Version | Description |
|---|---|
| 5.5.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_rest_plugins_controller/is_plugin_installed