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

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

$from

(Required) DOM element to copy the attributes from.

$to

(Required) DOM element to copy the attributes to.

$default_separator

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

Default value:','