WP_Plugin_Dependencies::has_dependents
Determines whether the plugin has plugins that depend on it.
Method of the class: WP_Plugin_Dependencies{}
No Hooks.
Returns
true|false. Whether the plugin has plugins that depend on it.
Usage
$result = WP_Plugin_Dependencies::has_dependents( $plugin_file );
- $plugin_file(string) (required)
- The plugin's filepath, relative to the plugins directory.
Changelog
| Since 6.5.0 | Introduced. |
WP_Plugin_Dependencies::has_dependents() WP Plugin Dependencies::has dependents code WP 6.9.1
public static function has_dependents( $plugin_file ) {
return in_array( self::convert_to_slug( $plugin_file ), (array) self::$dependency_slugs, true );
}