AMP_Base_Embed_Handler::match_element_attributes

AMP_Base_Embed_Handler::match_element_attributes( string $html,  string $tag_name,  string[] $attribute_names )

Description #

Get regex pattern for matching HTML attributes from a given tag name.


Parameters #

$html

(Required) HTML source haystack.

$tag_name

(Required) Tag name.

$attribute_names

(Required) Attribute names.


Return #

(string[]|null) Matched attributes, or null if the element was not matched at all.


Changelog #

Changelog
Version Description
1.5.0 Introduced.