Gets the filepath of installed dependencies.
Description
If a dependency is not installed, the filepath defaults to false.
Source
protected static function get_dependency_filepaths() {
if ( is_array( self::$dependency_filepaths ) ) {
return self::$dependency_filepaths;
}
if ( null === self::$dependency_slugs ) {
return array();
}
self::$dependency_filepaths = array();
$plugin_dirnames = self::get_plugin_dirnames();
foreach ( self::$dependency_slugs as $slug ) {
if ( isset( $plugin_dirnames[ $slug ] ) ) {
self::$dependency_filepaths[ $slug ] = $plugin_dirnames[ $slug ];
continue;
}
self::$dependency_filepaths[ $slug ] = false;
}
return self::$dependency_filepaths;
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.