WP_Plugin_Dependencies::get_dependent_filepath
Gets a dependent plugin's filepath.
Method of the class: WP_Plugin_Dependencies{}
No Hooks.
Returns
String|false. The dependent plugin's filepath, relative to the plugins directory, or false if the plugin has no dependencies.
Usage
$result = WP_Plugin_Dependencies::get_dependent_filepath( $slug );
- $slug(string) (required)
- The dependent plugin's slug.
Changelog
| Since 6.5.0 | Introduced. |
WP_Plugin_Dependencies::get_dependent_filepath() WP Plugin Dependencies::get dependent filepath code WP 6.9.1
public static function get_dependent_filepath( $slug ) {
$filepath = array_search( $slug, self::$dependent_slugs, true );
return $filepath ? $filepath : false;
}