GB_Dependencies::add
Register an item.
Registers the item if no item of that name already exists.
Signature
public function add(string
$handle,
string
$src,
[array
$deps = ,
[boolean
$ver = false,
[mixed
$args = NULL]]] )
Parameters
$handle
— string
Unique item name.$src
— string
The item url.$deps
— array
Optional. An array of item handle strings on which this item depends.$ver
— boolean
Optional. Version (used for cache busting).$args
— mixed
Optional. Custom property of the item. NOT the class property $args. Examples: $media, $in_footer.
Returns
- bool
- True on success, false on failure.
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
243 | 9 | error | Inline control structures are not allowed |