WP_Plugin_Dependencies::get_dependency_filepath( string $slug ): string|false

In this article

Gets the filepath for a dependency, relative to the plugin’s directory.

Parameters

$slugstringrequired
The dependency’s slug.

Return

string|false If installed, the dependency’s filepath relative to the plugins directory, otherwise false.

Source

public static function get_dependency_filepath( $slug ) {
	$dependency_filepaths = self::get_dependency_filepaths();

	if ( ! isset( $dependency_filepaths[ $slug ] ) ) {
		return false;
	}

	return $dependency_filepaths[ $slug ];
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.