WP_Plugin_Dependencies::get_dependents()
Gets filepaths of plugins that require the dependency.
Method of the class: WP_Plugin_Dependencies{}
No Hooks.
Return
Array
. An array of dependent plugin filepaths, relative to the plugins directory.
Usage
$result = WP_Plugin_Dependencies::get_dependents( $slug );
- $slug(string) (required)
- The dependency's slug.
Changelog
Since 6.5.0 | Introduced. |
WP_Plugin_Dependencies::get_dependents() WP Plugin Dependencies::get dependents code WP 6.7.1
public static function get_dependents( $slug ) { $dependents = array(); foreach ( (array) self::$dependencies as $dependent => $dependencies ) { if ( in_array( $slug, $dependencies, true ) ) { $dependents[] = $dependent; } } return $dependents; }