AMP_DOM_Utils::copy_attributes

AMP_DOM_Utils::copy_attributes( array|string $attributes,  DOMElement $from,  DOMElement $to,  string $default_separator = ',' )

Description #

Copy one or more attributes from one element to the other.


Parameters #

$attributes

(array|string) (Required) Attribute name or array of attribute names to copy.

$from

(DOMElement) (Required) DOM element to copy the attributes from.

$to

(DOMElement) (Required) DOM element to copy the attributes to.

$default_separator

(string) (Optional) Default separator to use for multiple values if the attribute is not known.

Default value:','