WP_Plugin_Dependencies::has_dependents()public staticWP 6.5.0

Determines whether the plugin has plugins that depend on it.

Метод класса: WP_Plugin_Dependencies{}

Хуков нет.

Возвращает

true|false. Whether the plugin has plugins that depend on it.

Использование

$result = WP_Plugin_Dependencies::has_dependents( $plugin_file );
$plugin_file(строка) (обязательный)
The plugin's filepath, relative to the plugins directory.

Список изменений

С версии 6.5.0 Введена.

Код WP_Plugin_Dependencies::has_dependents() WP 6.8.1

public static function has_dependents( $plugin_file ) {
	return in_array( self::convert_to_slug( $plugin_file ), (array) self::$dependency_slugs, true );
}