WP_Plugin_Dependencies::get_dependents( string $slug ): array

In this article

Gets filepaths of plugins that require the dependency.

Parameters

$slugstringrequired
The dependency’s slug.

Return

array An array of dependent plugin filepaths, relative to the plugins directory.

Source

public static function get_dependents( $slug ) {
	$dependents = array();

	foreach ( (array) self::$dependencies as $dependent => $dependencies ) {
		if ( in_array( $slug, $dependencies, true ) ) {
			$dependents[] = $dependent;
		}
	}

	return $dependents;
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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