WP_Plugin_Dependencies::get_dependency_filepath
Gets the filepath for a dependency, relative to the plugin's directory.
Method of the class: WP_Plugin_Dependencies{}
No Hooks.
Returns
String|false. If installed, the dependency's filepath relative to the plugins directory, otherwise false.
Usage
$result = WP_Plugin_Dependencies::get_dependency_filepath( $slug );
- $slug(string) (required)
- The dependency's slug.
Changelog
| Since 6.5.0 | Introduced. |
WP_Plugin_Dependencies::get_dependency_filepath() WP Plugin Dependencies::get dependency filepath code WP 6.9
public static function get_dependency_filepath( $slug ) {
$dependency_filepaths = self::get_dependency_filepaths();
if ( ! isset( $dependency_filepaths[ $slug ] ) ) {
return false;
}
return $dependency_filepaths[ $slug ];
}