This method has been deprecated. Use AmpProjectDomDocument::getElementId() instead.

AMP_DOM_Utils::get_element_id( DOMElement|AmpProjectDomElement $element,  string $prefix = 'amp-wp-id' )

Description #

Get the ID for an element.

If the element does not have an ID, create one first.

Parameters #


(DOMElement|AmpProjectDomElement) (Required) Element to get the ID for.


(string) (Optional) Defaults to 'amp-wp-id'.

Default value:'amp-wp-id'

Return #

(string) ID to use.

Changelog #

Version Description
1.5.1 Deprecated for AmpProjectDomDocument::getElementId()
1.4.0 Introduced.