Automattic\WooCommerce\EmailEditor\Integrations\Utils
Dom_Document_Helper::get_attribute_value_by_tag_name
Searches for the first appearance of the given tag name and returns the value of specified attribute.
Метод класса: Dom_Document_Helper{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$Dom_Document_Helper = new Dom_Document_Helper(); $Dom_Document_Helper->get_attribute_value_by_tag_name( $tag_name, $attribute ): ?string;
- $tag_name(строка) (обязательный)
- The tag name to search for.
- $attribute(строка) (обязательный)
- The attribute to get the value from.
Код Dom_Document_Helper::get_attribute_value_by_tag_name() Dom Document Helper::get attribute value by tag name WC 9.9.5
public function get_attribute_value_by_tag_name( string $tag_name, string $attribute ): ?string { $element = $this->find_element( $tag_name ); if ( ! $element ) { return null; } return $this->get_attribute_value( $element, $attribute ); }