WordPress at Your Fingertips
function is not described

SimplePie_Sanitize::add_attr() protected WP 1.0

{} It's a method of the class: SimplePie_Sanitize{}

No Hooks.

Return

null. Nothing.

Usage

// protected - for code of main (parent) or child class
$result = $this->add_attr( $tag, $valuePairs, $document );
$tag (required)
-
$valuePairs (required)
-
$document (required)
-

Code of SimplePie_Sanitize::add_attr() WP 5.8.2

protected function add_attr($tag, $valuePairs, $document)
{
	$elements = $document->getElementsByTagName($tag);
	foreach ($elements as $element)
	{
		foreach ($valuePairs as $attrib => $value)
		{
			$element->setAttribute($attrib, $value);
		}
	}
}