WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru Рекомендуемые продукты со скидкой от Template Monster
функция не описана

WP_Dependencies::add() WP 2.1.0

Register an item.

Registers the item if no item of that name already exists.

Это метод класса: WP_Dependencies

Хуков нет.

Возвращает

true/false. Whether the item has been registered. True on success, false on failure.

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

$WP_Dependencies = new WP_Dependencies();
$var = $WP_Dependencies->add( $handle, $src, $deps, $ver, $args );
$handle(строка) (обязательный)
Name of the item. Should be unique.
$src(строка/true/false) (обязательный)
Full URL of the item, or path of the item relative to the WordPress root directory. If source is set to false, item is an alias of other items it depends on.
$deps(строка[])
An array of registered item handles this item depends on.
По умолчанию: empty array
$ver(строка/true/false/null)
String specifying item version number, if it has one, which is added to the URL as a query string for cache busting purposes. If version is set to false, a version number is automatically added equal to current installed WordPress version. If set to null, no version is added.
По умолчанию: false
$args(смешанный)
Custom property of the item. NOT the class property $args. Examples: $media, $in_footer.
По умолчанию: null

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

С версии 2.1.0 Введена.
С версии 2.6.0 Moved from WP_Scripts.

Код WP Dependencies::add: wp-includes/class.wp-dependencies.php WP 5.2.4

<?php
public function add( $handle, $src, $deps = array(), $ver = false, $args = null ) {
	if ( isset( $this->registered[ $handle ] ) ) {
		return false;
	}
	$this->registered[ $handle ] = new _WP_Dependency( $handle, $src, $deps, $ver, $args );
	return true;
}