WP_REST_Plugins_Controller::is_plugin_installed() WordPress Method
The is_plugin_installed() method is used to check if a plugin is installed. This is useful for checking if a required plugin is installed before using it.
WP_REST_Plugins_Controller::is_plugin_installed( string $plugin ) #
Checks if the plugin is installed.
Parameters
- $plugin
(string)(Required)The plugin file.
Return
(bool)
Source
File: wp-includes/rest-api/endpoints/class-wp-rest-plugins-controller.php
protected function is_plugin_installed( $plugin ) { return file_exists( WP_PLUGIN_DIR . '/' . $plugin ); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
5.5.0 | Introduced. |