Determines whether the plugin has a circular dependency.
Parameters
$plugin_file
stringrequired- The plugin’s filepath, relative to the plugins directory.
Source
public static function has_circular_dependency( $plugin_file ) {
if ( ! is_array( self::$circular_dependencies_slugs ) ) {
self::get_circular_dependencies();
}
if ( ! empty( self::$circular_dependencies_slugs ) ) {
$slug = self::convert_to_slug( $plugin_file );
if ( in_array( $slug, self::$circular_dependencies_slugs, true ) ) {
return true;
}
}
return false;
}
Changelog
Version | Description |
---|---|
6.5.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.