WP_Plugin_Dependencies::has_circular_dependency()
Determines whether the plugin has a circular dependency.
Метод класса: WP_Plugin_Dependencies{}
Хуков нет.
Возвращает
true|false
. Whether the plugin has a circular dependency.
Использование
$result = WP_Plugin_Dependencies::has_circular_dependency( $plugin_file );
- $plugin_file(строка) (обязательный)
- The plugin's filepath, relative to the plugins directory.
Список изменений
С версии 6.5.0 | Введена. |
Код WP_Plugin_Dependencies::has_circular_dependency() WP Plugin Dependencies::has circular dependency WP 6.8
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; }