WP_Plugin_Dependencies::get_dependencies()
Gets the slugs of plugins that the dependent requires.
Method of the class: WP_Plugin_Dependencies{}
No Hooks.
Return
Array
. An array of dependency plugin slugs.
Usage
$result = WP_Plugin_Dependencies::get_dependencies( $plugin_file );
- $plugin_file(string) (required)
- The dependent plugin's filepath, relative to the plugins directory.
Changelog
Since 6.5.0 | Introduced. |
WP_Plugin_Dependencies::get_dependencies() WP Plugin Dependencies::get dependencies code WP 6.7.1
public static function get_dependencies( $plugin_file ) { if ( isset( self::$dependencies[ $plugin_file ] ) ) { return self::$dependencies[ $plugin_file ]; } return array(); }