WP_Plugin_Dependencies::get_dependent_filepath()public staticWP 6.5.0

Gets a dependent plugin's filepath.

Method of the class: WP_Plugin_Dependencies{}

No Hooks.

Return

String|false. The dependent plugin's filepath, relative to the plugins directory, or false if the plugin has no dependencies.

Usage

$result = WP_Plugin_Dependencies::get_dependent_filepath( $slug );
$slug(string) (required)
The dependent plugin's slug.

Changelog

Since 6.5.0 Introduced.

WP_Plugin_Dependencies::get_dependent_filepath() code WP 6.5.3

public static function get_dependent_filepath( $slug ) {
	$filepath = array_search( $slug, self::$dependent_slugs, true );

	return $filepath ? $filepath : false;
}