AMP_DOM_Utils::add_amp_action( DOMElement $element,  string $event,  string $action )

Description #

Register an AMP action to an event on a given element.

If the element already contains one or more events or actions, the method will assemble them in a smart way.

Parameters #


(DOMElement) (Required) Element to add an action to.


(string) (Required) Event to trigger the action on.


(string) (Required) Action to add.

Changelog #

Version Description
1.4.0 Introduced.