Gets filepaths of plugins that require the dependency.
$slugstringrequired
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;
}
| Version | Description |
|---|---|
| 6.5.0 | Introduced. |
© 2003–2024 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_plugin_dependencies/get_dependents