W3cubDocs

/WordPress

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 );
	}

Changelog

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/is_plugin_installed