WP_Plugin_Dependencies::get_dependencies()public staticWP 6.5.0

Gets the slugs of plugins that the dependent requires.

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

Хуков нет.

Возвращает

Массив. An array of dependency plugin slugs.

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

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

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

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

Код WP_Plugin_Dependencies::get_dependencies() WP 6.8.1

public static function get_dependencies( $plugin_file ) {
	if ( isset( self::$dependencies[ $plugin_file ] ) ) {
		return self::$dependencies[ $plugin_file ];
	}

	return array();
}