WP_Plugin_Dependencies::get_dependencies( string $plugin_file ): array

In this article

Gets the slugs of plugins that the dependent requires.

Parameters

$plugin_filestringrequired
The dependent plugin’s filepath, relative to the plugins directory.

Return

array An array of dependency plugin slugs.

Source

public static function get_dependencies( $plugin_file ) {
	if ( isset( self::$dependencies[ $plugin_file ] ) ) {
		return self::$dependencies[ $plugin_file ];
	}

	return array();
}

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

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