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.


Top ↑

Return

(bool)


Top ↑

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


Top ↑

Changelog

Changelog
VersionDescription
5.5.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.