WP_REST_Plugins_Controller::is_plugin_installed()
Checks if the plugin is installed.
Method of the class: WP_REST_Plugins_Controller{}
No Hooks.
Return
true|false
.
Usage
// protected - for code of main (parent) or child class $result = $this->is_plugin_installed( $plugin );
- $plugin(string) (required)
- The plugin file.
Changelog
Since 5.5.0 | Introduced. |
WP_REST_Plugins_Controller::is_plugin_installed() WP REST Plugins Controller::is plugin installed code WP 6.6.2
protected function is_plugin_installed( $plugin ) { return file_exists( WP_PLUGIN_DIR . '/' . $plugin ); }